FW: Strange behaviour of __del__

Peter Wang pzw1 at hotmail.com
Tue Dec 11 09:36:15 EST 2001


David Bolen <db3l at fitlinxx.com> wrote in message news:
> I think you're mostly on the right track except for the part about del
> actually being responsible for the decrement of the reference count.
> The object itself is definitely being kept alive by a reference in the
> traceback (via the 'self' local in one of the traceback frames), which
> will keep the object alive while the "last" traceback is held by Python.

Thanks for the clarification/correction!

<sigh>

as always with Python, the truth is subtle and (typically) consistent,
even if the behavior is mysterious.

</sigh>

-peter



More information about the Python-list mailing list