multiple values refactoring in params

This commit is contained in:
Dave Halter
2014-05-29 16:59:56 +02:00
parent 1899f16a4a
commit b24178b275
3 changed files with 56 additions and 25 deletions

View File

@@ -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
# -----------------

View File

@@ -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)