mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 07:14:48 +08:00
function calls with key arguments work now
This commit is contained in:
@@ -132,7 +132,7 @@ class Executable(object):
|
|||||||
print '\n\nlala', key, value
|
print '\n\nlala', key, value
|
||||||
while key:
|
while key:
|
||||||
try:
|
try:
|
||||||
key_param = param_dict[key]
|
key_param = param_dict[str(key)]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
non_matching_keys.append((key, value))
|
non_matching_keys.append((key, value))
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -170,11 +170,11 @@ test = [1,2]
|
|||||||
def args_func(arg1, arg2=1, *args, **kwargs):
|
def args_func(arg1, arg2=1, *args, **kwargs):
|
||||||
return arg1, arg2, args, kwargs
|
return arg1, arg2, args, kwargs
|
||||||
|
|
||||||
exe = args_func(1,"")
|
exe = args_func(arg2=1,arg1=set)
|
||||||
args_func() #1,"", a=list)[0].
|
args_func() #1,"", a=list)[0].
|
||||||
args_func(arg1=0, *test + [3], *[4,5], **{'a': 'b'}).
|
args_func(arg1=0, *test + [3], *[4,5], **{'a': 'b'}).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
exe[3].
|
exe[0].
|
||||||
|
|||||||
@@ -54,6 +54,21 @@ variable_rename(list())().
|
|||||||
#? []
|
#? []
|
||||||
variable_rename(1)().
|
variable_rename(1)().
|
||||||
|
|
||||||
|
# -----------------
|
||||||
|
# double execution
|
||||||
|
# -----------------
|
||||||
|
|
||||||
|
def func(a=1, b=''):
|
||||||
|
return a, b
|
||||||
|
|
||||||
|
exe = func(b=list, a=tuple)
|
||||||
|
#? []
|
||||||
|
exe[0].real
|
||||||
|
#? ['index']
|
||||||
|
exe[0].index
|
||||||
|
|
||||||
|
#? ['append']
|
||||||
|
exe[1].append
|
||||||
# -----------------
|
# -----------------
|
||||||
# closures
|
# closures
|
||||||
# -----------------
|
# -----------------
|
||||||
|
|||||||
Reference in New Issue
Block a user