Beginner Question : Iterators and zip

Terry Reedy tjreedy at udel.edu
Sun Jul 13 13:49:52 EDT 2008


moogyd at yahoo.co.uk wrote:

> What is this *lis operation called? I am having trouble finding any
> reference to it in the python docs or the book learning python.

One might call this argument unpacking, but
Language Manual / Expressions / Primaries / Calls
simply calls it *expression syntax.
"If the syntax *expression appears in the function call, expression must 
evaluate to a sequence. Elements from this sequence are treated as if 
they were additional positional arguments; if there are positional 
arguments x1,...,*xN* , and expression evaluates to a sequence 
y1,...,*yM*, this is equivalent to a call with M+N positional arguments 
x1,...,*xN*,*y1*,...,*yM*."

See Compound Statements / Function definitions for the mirror syntax in 
definitions.

tjr




More information about the Python-list mailing list