[issue40240] Expose public spelling of _PyGC_FINALIZED and _PyGC_SET_FINALIZED?

Pablo Galindo Salgado report at bugs.python.org
Thu Apr 9 12:23:46 EDT 2020


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

There is a specific Python function in 3.9 for it:

https://docs.python.org/3.9/library/gc.html#gc.is_finalized

So it may sense to add a function to query if an object is finalized, but I am not sure it makes sense to allow to mark an object as finalized because that could mess with the GC algorithm.

Certainly exposing the macros per se may be a bad idea because there are too many implementation details there (like where the flags are stored) so at least a new function will be needed.

----------

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


More information about the Python-bugs-list mailing list