On this page
  1. gc.get_objects
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

gc.get_objects

Prev: gc.get_freeze_count | Up: gc | Next: gc.get_referents
Rel: gc.collect, gc.disable, gc.enable, gc.freeze
Ref: docs.python.org — gc.get_objects
Tags: #public #python3 #stdlib #gc


Import

import gc
from gc import get_objects

Signature & Overview

gc.get_objects(generation=None)

Return a list of objects tracked by the collector (excluding the list returned).

Usage

import gc

objs = gc.get_objects(generation=0)
assert isinstance(objs, list)

Gotchas

REPL Inspect

from gc import get_objects
help(get_objects)

Linked from

Related notes