Amaury Forgeot d'Arc <amaur...@gmail.com> added the comment:

Why is the exception normalized at the end? I suppose it's because when value 
is an exception instance, it's replaced by a tuple, but the original value has 
to be recreated at the end. So in some cases, the SyntaxError object is created 
twice...

If PyErr_NormalizeException() can't be avoided, I suggest to call it at the 
start, just after PyErr_Fetch, and use the PySyntaxErrorObject* structure 
directly to get the file name and line numbers.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11441>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to