Jun-27-2019, 04:30 PM
I know there is a cache to hold for small integers [-5,256] but when i try to get reference count for a big number like:
>>> import sys >>> sys.getrefcount(2323232323) 3 >>>Why the result is 3 ? Are there some "internal variables" hold this value inside python ?. It doesn't make sense, i thought a new value is only created when we make a new assignment(expect for those in [-5,256])in our script.Furthermore, how can python's garbage collector collect these value ? Because they always have "internal variables" point to them and their reference counter never drop to 0 .Please help me out, guys
