[New-bugs-announce] [issue10189] SyntaxError: no binding for nonlocal doesn't contain a useful traceback
Alex
report at bugs.python.org
Sun Oct 24 21:22:07 CEST 2010
New submission from Alex <alex.gaynor at gmail.com>:
Given the code:
def f():
def g():
nonlocal a
a = 3
Running it produces:
alex at alex-laptop:/tmp$ python3.1 test.py
SyntaxError: no binding for nonlocal 'a' found
Compared to a different SyntaxError:
alex at alex-laptop:/tmp$ python3.1 test.py
File "test.py", line 1
print a
^
SyntaxError: invalid syntax
----------
components: Interpreter Core
messages: 119527
nosy: alex
priority: normal
severity: normal
status: open
title: SyntaxError: no binding for nonlocal doesn't contain a useful traceback
versions: Python 3.1
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10189>
_______________________________________
More information about the New-bugs-announce
mailing list