rich comparison fscks up reference count?

Gerhard Häring gerhardhaering at
Mon Apr 12 14:55:05 EDT 2010

On Apr 12, 4:27 pm, Gerhard Häring <gerhardhaer... at>
> Maybe somebody can enlighten me here. I can't figure out why doing a
> rich comparison on my object decreases the total reference count by 1. [...]

Doh! It turned out the strange effect was due to my particular build
My Python 2.6/3.1 are built using our own SCons-based build and the
corresponding Makefile that distutils then uses didn't have the same

So, the Python was built with Py_REF_DEBUG, but Py_REF_DEBUG was not
when I built my extension module. Which fscked up the *total*
counting  (sys.gettotalrefcount()).

-- Gerhard

More information about the Python-list mailing list