[Python-Dev] removing nested tuple function parameters

Raymond Hettinger raymond.hettinger at verizon.net
Mon Sep 19 02:10:20 CEST 2005

> Is anyone truly attached to nested tuple function parameters; ``def
> fxn((a,b)): print a,b``? 

I am.

> ditching them thanks to the pain they caused in the AST branch.

Changing the grammar for the convenience of a particular AST
implementation carries zero weight with me -- that is the tail wagging
the dog.  

Besides, I had thought that one of the goals of AST was to make it
easier to experiment with language.  Are you finding that it has a hard
time even with the existing grammar?  AFAICT, nested tuple arguments
presented no problem for Jython or PyPy.

> Plus I don't think they are used very much (gut feeling, though, and
> not based on any grepping).

python-dev grammar change proposals should probably be held to a higher
standard than "gut feeling, just toss it" whims.

> The fixes needed to make them work properly didn't seem all that ugly
> me.

That pretty much settles it the "do it for the convenience of AST"

[Andrew Bennetts]
> Please keep them!  Twisted code uses them in places for Deferred 
> callbacks that need to deal with multiple return values.

And that settles the question of whether people are using them in real


More information about the Python-Dev mailing list