mirror of
https://github.com/davidhalter/jedi.git
synced 2026-11-06 09:52:54 +08:00
multiple values refactoring in params
This commit is contained in:
1 parent
1899f16a4a
commit
b24178b275
3 files changed
+56
-25
No files matched your search
@@ -231,6 +231,17 @@ exe[1]
|
||||
#? list()
|
||||
exe[1][1]
|
||||
|
||||
|
||||
# In a dynamic search, both inputs should be given.
|
||||
def simple(a):
|
||||
#? int() str()
|
||||
return a
|
||||
def xargs(*args):
|
||||
return simple(*args)
|
||||
|
||||
xargs(1)
|
||||
xargs('')
|
||||
|
||||
# -----------------
|
||||
# ** kwargs
|
||||
# -----------------
|
||||
|
||||
@@ -27,3 +27,17 @@ def nested_twice(*args1):
|
||||
return nested(*args1)
|
||||
|
||||
nested_twice(2, 3)
|
||||
#! 12 type-error-too-few-arguments
|
||||
nested_twice(2)
|
||||
|
||||
# -----------------
|
||||
# **kwargs
|
||||
# -----------------
|
||||
|
||||
|
||||
def kwargs_test(**kwargs):
|
||||
return simple2(1, **kwargs)
|
||||
|
||||
kwargs_test(c=3, b=2)
|
||||
kwargs_test(c=3)
|
||||
kwargs_test(b=2)
|
||||
Reference in new issue
Block a user