Nested Parameter Definitions

Steven D'Aprano steve at REMOVEME.cybersource.com.au
Sun Feb 25 19:37:47 EST 2007


On Sun, 25 Feb 2007 10:00:31 -0800, Paddy wrote:

> 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?

I learnt about this some time ago. I don't often use it, although it makes
sense to write this:

def parrot(x, (y, z)):
    pass

instead of this:

def parrot(x, a2tuple):
    y, z = a2tuple
    pass



-- 
Steven D'Aprano 




More information about the Python-list mailing list