[Python-Dev] Extending tuple unpacking

Nick Coghlan ncoghlan at gmail.com
Thu Oct 13 11:54:15 CEST 2005


Michael Chermside wrote:
> Guido writes:
> 
>>I've always wanted to write that as
>>
>>    f(a, b, *args, foo=1, bar=2, **kwds)
>>
>>but the current grammar doesn't allow it.
> 
> 
> Hmm.... why doesn't the current grammar allow it, and can we fix that?
> I don't see that it's a limitation of the one-token-lookahead, could
> we permit this syntax by rearanging bits of the grammer?

I griped about this a while back, and got the impression from Guido that 
fixing it was possible, but it had simply never bugged anyone enough for them 
to actaully get around to fixing it.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://boredomandlaziness.blogspot.com


More information about the Python-Dev mailing list