[Python-Dev] removing nested tuple function parameters

Brett Cannon bcannon at gmail.com
Mon Sep 19 02:41:51 CEST 2005

On 9/18/05, Raymond Hettinger <raymond.hettinger at verizon.net> wrote:
> [Brett]
> > 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.

I obviously didn't make the statement clear enough.  The suport is
already in the AST branch, it was just a statement Jeremy made once
while starting to work on the implementaiton for the AST branch that I
happen to still remember.  They are already supported.

The real trigger for this is introspection issues in terms of function
paramters.  Without changing the way the bytecode does things the only
way to know the exact parameters is to inspect the bytecode.  There
are possible solutions than removal, but I personally find the use of
nested tuple arguments hard to read and not widely known as Guido
pointed out in another email.

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

Which is why I asked first before doing a full-blown push for this.


More information about the Python-Dev mailing list