[Python-Dev] nonlocal x = value

Terry Reedy tjreedy at udel.edu
Thu Dec 23 00:41:08 CET 2010


On 12/22/2010 5:11 PM, Laurens Van Houtven wrote:
> On Sat, Dec 18, 2010 at 1:12 PM, Georg Brandl<g.brandl at 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?

I am sure he meant it to be, and I agree. We lived without
global x = 3, y
all these years.

> If you don't allow such assignments, there can't be any ambiguity,
> right? (Or am I missing something?)


-- 
Terry Jan Reedy



More information about the Python-Dev mailing list