PyDocs

Nav

Python Runtime Services

get_objects

gc

function
  • get_objects(generation=None)
Return a list of objects tracked by the collector (excluding the list returned).

  generation
    Generation to extract the objects from.

If generation is not None, return only the objects tracked by the
collector that are in that generation.
Changed in 3.8, 3.14, 3.14.5
  • 3.8: New generation parameter.
  • 3.14: Generation 1 is removed
  • 3.14.5: Generation 1 is reintroduced to maintain GC behavior from 3.13.
0 Examples
No examples for gc/get_objects.
See Also
No see-alsos for gc/get_objects
0 Notes
No notes for get_objects