This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author alex
Recipients alex
Date 2010-10-24.19:22:05
SpamBayes Score 6.8982576e-05
Marked as misclassified No
Message-id <1287948127.54.0.779100996642.issue10189@psf.upfronthosting.co.za>
In-reply-to
Content
Given the code:

def f():
    def g():
        nonlocal a
        a = 3

Running it produces:

alex@alex-laptop:/tmp$ python3.1 test.py 
SyntaxError: no binding for nonlocal 'a' found

Compared to a different SyntaxError:

alex@alex-laptop:/tmp$ python3.1 test.py 
  File "test.py", line 1
    print a
          ^
SyntaxError: invalid syntax
History
Date User Action Args
2010-10-24 19:22:07alexsetrecipients: + alex
2010-10-24 19:22:07alexsetmessageid: <1287948127.54.0.779100996642.issue10189@psf.upfronthosting.co.za>
2010-10-24 19:22:05alexlinkissue10189 messages
2010-10-24 19:22:05alexcreate