Conversion from tuple to argument list?
Erik Johnson
ejohnso9 at earthlink.net
Tue Nov 20 18:28:23 EST 2001
Chris Liechti wrote:
> <SNIP>
>
> >>> args = range(3)
>
> newer python releases:
> >>> struct.pack("bbb", *args)
> '\x00\x01\x02'
>
Hmm, I am new to Python. ORA's "Learning Python" & "Programming Python"
both document the use of '*' for variable argument lists in the function
definition, but this is the first time I have seen it used in the function
call. Does this sort of use have a name? Is this documented somewhere?
Thanks,
-ej
More information about the Python-list
mailing list