1
0
forked from VimPlug/jedi

more kwargs tests

This commit is contained in:
David Halter
2012-07-11 02:09:52 +02:00
parent 5f33bbd8ca
commit e8c1b8c5bd

View File

@@ -178,9 +178,23 @@ exe[1][1]
def kwargs_func(**kwargs): def kwargs_func(**kwargs):
return kwargs return kwargs
exe = kwargs_func(a=3,b=4) exe = kwargs_func(a=3,b=4.0)
#? dict() #? dict()
exe exe
#? int()
exe['a']
#? float()
exe['b']
#? int() float()
exe['c']
exe = kwargs_func(3, a=3)
#? dict()
exe
#? int()
exe['a']
#? []
exe['b']
# ----------------- # -----------------
# *args / ** kwargs # *args / ** kwargs
@@ -238,7 +252,7 @@ def nested_kw2(**kwargs2):
#? int() #? int()
nested_kw(b=1, c=1.0, list) nested_kw(b=1, c=1.0, list)
#? int() #? int()
nested_kw('', b=1, c=1.0, list) nested_kw('', b=1)
#? int() #? int()
nested_kw('', d=1.0, b=1, list) nested_kw('', d=1.0, b=1, list)
#? int() #? int()