Nested Parameter Definitions

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Sun Feb 25 20:43:03 EST 2007


En Sun, 25 Feb 2007 15:00:31 -0300, Paddy <paddy3118 at googlemail.com>  
escribió:

>>>> def x ((p0, p1), p2):
> ...     return p0,p1,p2

The first time I saw it used was in Zope, a long time ago. And I like it.  
Of course it only has any sense if you expect the tuple (p0,p1) to exist  
*before* the function is called; by example, when it's the return value of  
some other function.

-- 
Gabriel Genellina




More information about the Python-list mailing list