Advice needed on __del__

Scott David Daniels Scott.Daniels at Acm.Org
Mon May 9 20:28:46 EDT 2005


André Roberge wrote:
> ...  Each time I refresh the screen, I could
> force that call, then check to see if Evil has been
> destroyed by Python, which would give me the information
> I need to destroy Evil_twin behind the scene myself -
> which is what I am really after.

What might work is to keep a weakref to Evil in Evil_twin.
Upon refresh, you could check if the weakref has gone stale.
Is that good enough?


--Scott David Daniels
Scott.Daniels at Acm.Org



More information about the Python-list mailing list