Coder Bits and Pieces
Showing posts with label
function signatures
.
Show all posts
Showing posts with label
function signatures
.
Show all posts
Thursday, May 8, 2008
Definitional tuple-packing in Python
Python functions may tuple-pack their arguments.
def foo(a, (b, c)):
print a, b, c
>>> foo(10, (20, 30))
10 20 30
Arguments unpack during evaluation.
Older Posts
Home
Subscribe to:
Comments (Atom)