The voodoo of zip(*someList)

Message Drop Box mdrop1 at yahoo.com
Mon Aug 30 19:55:10 EDT 2004


Thank you all very much. 

Jacek Generowicz <jacek.generowicz at cern.ch> wrote
> > I've never seen the star '*' outside of function/method definitions
> 
> It can also be used in function invocations, where it means pretty
> much the reverse of what it means in function definitions.
> 
> In a parameter list "*foo" means "collect remaining positional
> arguments into a sequence (tuple) called 'foo'". In an argument list,
> it means "take the sequence 'foo' and expand it into a set of
> positional arguments".
> 
> You can "reverse" the **kwds syntax in the same way too.
> 
> > and I've looked in the Python documentation without success.
> 
> Try page 39 of the Python Reference Manual.



More information about the Python-list mailing list