[Python-Dev] When tp_clear returns non-zero?

Neil Schemenauer nas-python at arctrix.com
Mon May 28 12:34:23 EDT 2018


On 2018-05-28, Serhiy Storchaka wrote:
> I'm interesting what the result of this function means. In what
> cases it can return non-zero, and can it set an exception?

My memory is fuzzy (nearly 20 years since I wrote that code).  My
best guess is that I thought a return value might be useful somehow.
As you have noticed, the return type probably should have been void.

If you want to see one of the first implementations of the Python
GC, I still have a patch:

    http://python.ca/nas/python/gc/gc-cycle-152.diff

Regards,

  Neil


More information about the Python-Dev mailing list