Re: [Python-Dev] Issue 4199: combining assignment with global & nonlocal

2013-06-29 Thread Benjamin Peterson
Agreed. The currently supported syntax (a global/nonlocal line and an assignment) is not too painful to figure out the ambiguity of the proposed syntax. 2013/6/29 Guido van Rossum : > I agree that there are problems with the idea of combining assignment > and global statements, because the ambigui

Re: [Python-Dev] Issue 4199: combining assignment with global & nonlocal

2013-06-29 Thread Guido van Rossum
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. --Gu

[Python-Dev] Issue 4199: combining assignment with global & nonlocal

2013-06-29 Thread A.M. Kuchling
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 t