fosshelp
Saturday, April 16, 2011
python Function argument unpacking
def test(x, y):
pass
args1 = (3, 4)
args2 = {'y': 3, 'x': 2}
test(*args1)
test(**args2)
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment