`gc.get_stats()`: Unveiling Collection Details Per Generation

This function returns a list of three dictionaries, one for each generation, detailing collection counts, total collected objects, and uncollectable objects, offering direct insight into GC activity and the impact of `set_threshold` changes.

Sources

Open the full topic