On this page
gc.is_finalized
Prev: gc.get_threshold | Up: gc | Next: gc.is_tracked
Rel: gc.collect, gc.disable, gc.enable, gc.freeze
Ref: docs.python.org — gc.is_finalized
Tags: #public #python3 #stdlib #gc
Import
import gc
from gc import is_finalized
Signature & Overview
gc.is_finalized(obj, /)
Returns true if the object has been already finalized by the GC.
Usage
import gc
x = object()
assert gc.is_finalized(x) is False
Gotchas
- Returns
Trueifobjhas already been finalized by the cyclic GC.
REPL Inspect
from gc import is_finalized
help(is_finalized)
Linked from
Related notes
- tuts/python3/stdlib_module/gc/get_threshold Linked here; links to this page; shared tags: #gc, #stdlib
- tuts/python3/stdlib_module/gc/is_tracked Linked here; links to this page; shared tags: #gc, #stdlib
- tuts/python3/stdlib_module/gc Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/gc/collect Linked here; shared tags: #gc, #stdlib
- tuts/python3/stdlib_module/gc/disable Linked here; shared tags: #gc, #stdlib
- tuts/python3/stdlib_module/gc/enable Linked here; shared tags: #gc, #stdlib
- tuts/python3/stdlib_module/gc/freeze Linked here; shared tags: #gc, #stdlib
- tuts/python3/stdlib_module/gc/get_count shared tags: #gc, #stdlib
- tuts/python3/stdlib_module/gc/get_debug shared tags: #gc, #stdlib
- tuts/python3/stdlib_module/gc/get_freeze_count shared tags: #gc, #stdlib