[issue33714] module can set an exception in tp_clear

Petr Viktorin report at bugs.python.org
Tue Sep 11 18:06:33 EDT 2018


Petr Viktorin <encukou at gmail.com> added the comment:

I'm not sure what tp_clear should do in this situation.
Other than propagating the exception to the GC, the most reasonable behavior seems to be to write the exception to stderr and ignore it -- but I think having the GC do that would be more robust.

IOW, I think raising an exception from tp_clear is reasonable, and if that caused (causes?) a crash, it's a bug.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33714>
_______________________________________


More information about the Python-bugs-list mailing list