Getting the reference count

Moshe Zadka moshez at math.huji.ac.il
Sun Aug 27 05:52:44 EDT 2000


On Sun, 27 Aug 2000, Makhno wrote:

> Is it possible to get the reference count of a PyObject* object?
> I'm surre it must be, but I can't see it documented anywhere.
> 
> Something similar to Perl's SvREFCNT() Macro would be great.

>From Python, you can get sys.getrefcount.
You can use it in the C API to, via Py_CallObject
--
Moshe Zadka <moshez at math.huji.ac.il>
There is no IGLU cabal.
http://advogato.org/person/moshez





More information about the Python-list mailing list