[Tutor] Trying to understand sys.getrefcount()
cappy2112 at gmail.com
Fri Oct 13 00:48:25 CEST 2006
I'm using Python 2.3.4
After reading this in the docs
*getrefcount*( object) Return the reference count of the object. The count
returned is generally one higher than you might expect, because it includes
the (temporary) reference as an argument to getrefcount().I decided to try
I understand why j1 is 1 higher than I expect, based on the docs, but why
does getrefcount(junk) return 5 before any instances of class junk are made?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor