[issue32377] Difference in ressurrection behavior with __del__ in py2 vs. py3

Eric Cousineau report at bugs.python.org
Tue Dec 19 11:46:38 EST 2017


Eric Cousineau <eric.cousineau at tri.global> added the comment:

You're welcome, and thank you for the prompt response!

I will say that it feels a tad odd to only have `tp_finalize` be called once for the entire lifetime of the object, while still having the option of it being resurrected.
Is there any way to somehow "un-mark" the object to enable this workflow that I would like to have?

My current hack is to call `_PyGC_SET_FINALIZED(self, 0)` - may I ask if there is a simpler way to do this?

----------

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


More information about the Python-bugs-list mailing list