Python's Default GC Thresholds Explained

By default, Python's `gc.set_threshold` is `(700, 10, 10)`. This means Generation 0 is collected after 700 net object allocations, Generation 1 after 10 Generation 0 collections, and Generation 2 after 10 Generation 1 collections, prioritizing frequent collection of short-lived objects.

Sources

Open the full topic