[Python-Dev] Issue 4199: combining assignment with global & nonlocal
benjamin at python.org
Sun Jun 30 02:22:44 CEST 2013
Agreed. The currently supported syntax (a global/nonlocal line and an
assignment) is not too painful to figure out the ambiguity of the
2013/6/29 Guido van Rossum <guido at python.org>:
> I agree that there are problems with the idea of combining assignment
> and global statements, because the ambiguity of "global x, y = p, q"
> is just too much to handle. The only case would be if there was only a
> single variable, but that fails the test of easy generalization. So
> let's close it.
> On Sat, Jun 29, 2013 at 3:00 PM, A.M. Kuchling <amk at amk.ca> wrote:
>> Issue 4199 begins with a self-explanatory comment:
>> PEP 3104 says that the nonlocal and global statements should
>> allow a shorthand. ("global x; x = 3" == "global x = 3") This
>> patch implements that.
>> Benjamin posted his patch on 2008-10-24. It got postponed to 3.2
>> because it was too late for 3.1, and then to 3.3 because 3.2 still
>> fell under the language moratorium, and then was forgotten for 3.3.
>> Georg Brandl and Jeremy Hylton raised some issues with the patch and
>> with the PEP's specification:
>> We've gone five years in 3.x without supporting this statement form.
>> Is it still worth implementing it for 3.4? Or should the issue simply
>> be closed (and maybe a note added to the PEP that "we didn't do this
>> after all")?
>> Python-Dev mailing list
>> Python-Dev at python.org
>> Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org
> --Guido van Rossum (python.org/~guido)
> Python-Dev mailing list
> Python-Dev at python.org
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/benjamin%40python.org
More information about the Python-Dev