On Fri, Dec 17, 2010 at 12:33 PM, Benjamin Peterson <benja...@python.org> wrote: .. >> Another +1 for the same reasons. Also, since global does not allow >> assignment, neither should nonlocal. > > Note that the PEP stated that global would also be extended.
I missed that, so for future reference, the PEP says: """ A shorthand form is also permitted, in which nonlocal is prepended to an assignment or augmented assignment: nonlocal x = 3 The above has exactly the same meaning as nonlocal x; x = 3. (Guido supports a similar form of the global statement.) """ and refers to Guido's post at http://mail.python.org/pipermail/python-3000/2006-November/004166.html In any case, the relevant issue is http://bugs.python.org/issue4199 and it should probably be marked as "after moratorium". Meanwhile an implementation status note can be added to the PEP to avoid this issue being brought up again. _______________________________________________ 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