PyDocs

Nav

Python Runtime Services

is_finalized

gc

function · Added in 3.9
  • is_finalized(obj)
Returns true if the object has been already finalized by the GC.
1 Example
>>> x = None
>>> class Lazarus:
...     def __del__(self):
...         global x
...         x = self
...
>>> lazarus = Lazarus()
>>> gc.is_finalized(lazarus)
False
>>> del lazarus
>>> gc.is_finalized(x)
True
from the Python docs
See Also
No see-alsos for gc/is_finalized
0 Notes
No notes for is_finalized