[issue10189] SyntaxError: no binding for nonlocal doesn't contain a useful traceback

R. David Murray report at bugs.python.org
Mon Oct 25 04:01:56 CEST 2010


R. David Murray <rdmurray at bitdance.com> added the comment:

There are a number of such symbol resolution error messages for nonlocal that don't provide location information in symtable.c.  I'm not very experienced with hacking the C code, but a naive addition of location information based on similar calls that do provide it results in error messages that point to the "wrong" line(*).  So my guess is that the person who implemented this code just didn't get around to dealing with that localization issue.

It would appear from svn log like the person in question is Jeremy Hylton, so I'm adding him as nosy.

(*) I put wrong in quotes because it's not wrong from the point of view of the code generating the error, because that code is looking at blocks, not lines.  But it's wrong from the point of view of the user reading the message....

----------
nosy: +jhylton, r.david.murray

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10189>
_______________________________________


More information about the Python-bugs-list mailing list