Viewing the refcount of an object
suggest change>>> import sys
>>> a = object()
>>> sys.getrefcount(a)
2
>>> b = a
>>> sys.getrefcount(a)
3
>>> del b
>>> sys.getrefcount(a)
2
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents