Pablo Galindo Salgado <pablog...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue40240>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to