Beginner Question : Iterators and zip

moogyd at yahoo.co.uk moogyd at yahoo.co.uk
Mon Jul 14 16:46:35 CEST 2008


On 13 Jul, 19:49, Terry Reedy <tjre... at udel.edu> wrote:
> moo... 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

Thanks,

It's starting to make sense :-)

Steven



More information about the Python-list mailing list