call of __del__ non-deterministic in python 2.4 (cpython)?

Fredrik Lundh fredrik at pythonware.com
Wed Dec 13 05:09:13 EST 2006


Holger Joukl wrote:

> Anyway: Is relying on __del__ getting called immediately when the refcount
> drops to 0 a no-no?

yes, but more importantly, relying on the refcount dropping to 0 when 
something goes out of scope is a major no-no.

> If so should that maybe be prominently stated in the docs?

is it perhaps the color that made you miss the big bold boxes in the 
documentation?

     http://docs.python.org/ref/customization.html#l2h-177

</F>




More information about the Python-list mailing list