ref counting, access from python

Michael P. Reilly arcege at shore.net
Thu Jun 17 16:15:56 CEST 1999


Christian Tismer <tismer at appliedbiometrics.com> wrote:

: Oleg Orlov wrote:
:> 
:> Hello.
:> How can i get objects current ref count from my python code?
:> Thanks.

:>>> import sys
:>>> sys.getrefcount(None)
: 1583
:>>> print "ciao - chris"
: ciao - chris
:>>> 

Wow, 1583 seems a little high to me. ;)

Python 1.5.2 (#14, Jun 11 1999, 16:31:09) [C] on aix4
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import sys
>>> sys.getrefcount(None)
140
>>>

Anyone wonder what chris has been doing? ;)

  -Arcege





More information about the Python-list mailing list