Re: [Python-Dev] Nonlocal shortcut

2008-12-08 Thread Calvin Spealman
Did the original PEP discussion cover debates about the shortcut working for all assignment operators (like += and x[i] =) and the difference between it being one-shot (doesnt affect x for the rest of the function) or simply the unrolling into nonlocal x; x= y as it is? On Mon, Dec 8, 2008 at 5:07

Re: [Python-Dev] Nonlocal shortcut

2008-12-08 Thread Guido van Rossum
On Sun, Dec 7, 2008 at 2:45 PM, Amaury Forgeot d'Arc <[EMAIL PROTECTED]> wrote: > Hello, > > Fabio Zadrozny wrote: >> Hi, >> >> I'm currently implementing a parser to handle Python 3.0, and one of >> the points I found conflicting with the grammar specification is the >> PEP 3104. >> >> It says th

Re: [Python-Dev] Nonlocal shortcut

2008-12-07 Thread Fabio Zadrozny
>> I'm currently implementing a parser to handle Python 3.0, and one of >> the points I found conflicting with the grammar specification is the >> PEP 3104. >> >> It says that a shortcut would be added to Python 3.0 so that "nonlocal >> x = 0" can be written. However, the latest grammar specificati

Re: [Python-Dev] Nonlocal shortcut

2008-12-07 Thread Terry Reedy
Fabio Zadrozny wrote: Hi, I'm currently implementing a parser to handle Python 3.0, and one of the points I found conflicting with the grammar specification is the PEP 3104. It says that a shortcut would be added to Python 3.0 so that "nonlocal x = 0" can be written. As near as I can tell fr

Re: [Python-Dev] Nonlocal shortcut

2008-12-07 Thread Amaury Forgeot d'Arc
Hello, Fabio Zadrozny wrote: > Hi, > > I'm currently implementing a parser to handle Python 3.0, and one of > the points I found conflicting with the grammar specification is the > PEP 3104. > > It says that a shortcut would be added to Python 3.0 so that "nonlocal > x = 0" can be written. Howeve