Nested Parameter Definitions

Paddy paddy3118 at googlemail.com
Sun Feb 25 13:00:31 EST 2007


I blogged on finding a new-to-me feature of Python, in that you are
allowed to nnest parameter definitions:

>>> def x ((p0, p1), p2):
...     return p0,p1,p2
...
>>> x(('Does', 'this'), 'work')
('Does', 'this', 'work')
>>>

Ruben commented that there was a poll on this features continued
existence taken at PyCon and it could go.

Just as I found it, it could go

I wondered if those of you with some Python experience new of nested
parameters and don't use them; or just forgot/don't know it is
possible?

- Paddy.

Oh - the blog entry is at http://paddy3118.blogspot.com/2007/02/pythons-function-nested-parameter.html




More information about the Python-list mailing list