[issue23996] _PyGen_FetchStopIterationValue() crashes on unnormalised exceptions

Stefan Behnel report at bugs.python.org
Mon May 25 20:08:54 CEST 2015


Stefan Behnel added the comment:

I noticed that my patch isn't entirely correct. If the exception value is a tuple, both PyErr_SetObject() and PyErr_NormalizeException() use it directly as *argument tuple* for the exception instantiation call, i.e. they essentially unpack it into separate arguments. The StopIteration value is then only the first item of that tuple.

I wonder if it's worth repeating this, uhm, surprising special case in yet another place, or if we should just always instantiate the exception.

----------
status: closed -> open

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


More information about the Python-bugs-list mailing list