gc.get_stats()
Return a list of three per-generation dictionaries containing collection statistics since interpreter start. The number of keys may change in the future, but currently each dictionary will contain the following items:
-
collections
is the number of times this generation was collected; -
collected
is the total number of objects collected inside this generation; -
uncollectable
is the total number of objects which were found to be uncollectable (and were therefore moved to thegarbage
list) inside this generation.
New in version 3.4.
Please login to continue.