Garbage collector generation threshold
In post https://github.com/python/devguide/blob/main/internals/garbage-collector.rst, generation threshold is described as follwing:
Generations are collected when the number of objects that they contain reaches some predefined threshold, which is unique for each generation and is lower the older the generations are.
It sounds like generation 0 starts when there are 700 objects in it, generation 1 starts when there are 10 objects in it and generation 2 starts when there are 10 objects in it.
This is very different from the fact(at least for generation 1) which https://docs.python.org/3/library/gc.html#gc.set_threshold describes:
If generation 0 has been examined more than threshold1 times since generation 1 has been examined, then generation 1 is examined as well. With the third generation, things are a bit more complicated, see Collecting the oldest generation for more information.
Maybe I am too literal, but I think it's really misleading.
Thanks, @zikcheng for opening the issue!
Indeed, the current way this is described is confusing and incorrect. I will update the text so it matches the documentation.
Thanks for noticing the error!