[issue30496] Incomplete traceback with `exec` on SyntaxError
Serhiy Storchaka
report at bugs.python.org
Mon May 29 13:56:29 EDT 2017
Serhiy Storchaka added the comment:
The traceback contain the location of the code that raised an exception when executed. In case of NameError this is a line in your script "x=u". In case of SyntaxError the code that failed is not in your script (it still is not executed), but in a compiler implicitly called by exec(). The line with exec() is correctly reported.
The behavior looks correct to me.
----------
nosy: +serhiy.storchaka
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30496>
_______________________________________
More information about the Python-bugs-list
mailing list