Am 22.12.2010 23:11, schrieb Laurens Van Houtven:
> On Sat, Dec 18, 2010 at 1:12 PM, Georg Brandl <g.bra...@gmx.net> wrote:
>> Am 17.12.2010 17:52, schrieb Laurens Van Houtven:
>>> +1 for throwing it out of the PEP. Assignment is a thing,
>>> nonlocal/global is a thing, don't mix them up :) (That in addition to
>>> the grammar cleanliness argument Stephan already made)
>>
>> The trouble is what to make of
>>
>> nonlocal x = 3, y
>>
>> Is it two nonlocal declarations or one with a tuple assignment?
>>
>> Georg
> 
> I'm not sure I understand. Isn't that another reason to throw it out?
> If you don't allow such assignments, there can't be any ambiguity,
> right? (Or am I missing something?)

Yes and no -- there may not be an ambiguity to the parser, but still to
the human.  Except if you disallow the syntax in any case, requiring
people to write

nonlocal x = (3, y)

which is then again inconsistent with ordinary assignment statements.

Georg

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to