https://docs.python.org/3/library/gc.html#gc.collect says "The number of unreachable objects found is returned."
In fact, it returns (
) the sum of two numbers: the number of objects collected plus the number of uncollectable objects. The docs should be changed.
(What makes an object uncollectable? I didn't read too closely but it seems to have something to do with finalizers.)
Linked PRs
https://docs.python.org/3/library/gc.html#gc.collect says "The number of unreachable objects found is returned."
In fact, it returns (
cpython/Modules/gcmodule.c
Line 1378 in 48dfd74
(What makes an object uncollectable? I didn't read too closely but it seems to have something to do with finalizers.)
Linked PRs