[Python-Dev] __traceback__ and reference cycles
Brett Cannon
bcannon at gmail.com
Tue Aug 9 04:02:40 CEST 2005
On 8/8/05, Tim Peters <tim.peters at gmail.com> wrote:
> I can't think of a Python feature with a higher aggregate
> braincell_burned / benefit ratio than __del__ methods. If P3K retains
> them-- or maybe even before --we should consider taking "the Java
> dodge" on this one. That is, decree that henceforth a __del__ method
> will get invoked by magic at most once on any given object O, no
> matter how often O is resurrected.
>
Wasn't there talk of getting rid of __del__ a little while ago and
instead use weakrefs to functions to handle cleaning up? Is that
still feasible? And if so, would this alleviate the problem?
-Brett
More information about the Python-Dev
mailing list