[issue11441] compile() raises SystemError if called from except clause

Daniel Urban report at bugs.python.org
Thu Mar 10 18:57:46 CET 2011


Daniel Urban <urban.dani+py at gmail.com> added the comment:

Err... sorry, I don't understand again:

If we get a tuple, create a new, store it without normalization. That's okay, I understand.

If we get a SyntaxError instance, then take its args field, create the new tuple. Then call PyErr_NormalizeException(), with:
a) the new tuple? But this will create a new SyntaxError instance...
b) the old SyntaxError instance? But this won't correct the wrong fields of the instance. (I think SyntaxError.__init__ would correct them without creating a new instance.)
c) or replace the args of the SyntaxError instance with the new tuple, then call PyErr_NormalizeException() on the instance? But I think that still won't correct the other fields of the instance...

Sorry for all these questions... I'd just like to help.

----------

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


More information about the Python-bugs-list mailing list