New submission from Alex <alex.gay...@gmail.com>:

Given the code:

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

Running it produces:

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

Compared to a different SyntaxError:

a...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue10189>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to