[issue11441] compile() raises SystemError if called from except clause
Daniel Urban
report at bugs.python.org
Tue Mar 8 18:31:42 CET 2011
Daniel Urban <urban.dani+py at gmail.com> added the comment:
Apparently ast_error_finish calls PyTuple_GetItem with a value that is not a tuple, but a SyntaxError instance (in Python/ast.c line 112). It seems that ast_error_finish expects that PyErr_Fetch will return the exception value as a tuple, and in some cases this seems correct (for example when not in an except clause), but not in this case. I don't know much about Python exception handling in C, but it seems to me, that it shouldn't expect always a tuple (see also http://docs.python.org/dev/py3k/c-api/exceptions.html#PyErr_NormalizeException).
----------
nosy: +durban
versions: +Python 3.2
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11441>
_______________________________________
More information about the Python-bugs-list
mailing list