[Python-Dev] Re: More fun with Python shutdown

Ronald Oussoren oussoren at cistron.nl
Thu Nov 13 04:59:48 EST 2003

On 13 nov 2003, at 0:48, Greg Ewing wrote:

> Bernhard Herzog <bh at intevation.de>:
>> Wouldn't it be possible to call the callbacks of all weakrefs that 
>> point
>> to a cycle about to be destroyed before that destruction begins?
> I'm not sure that would be a good idea, for the same reasons that it
> wouldn't be a good idea to do the same for __del__ methods. Something
> might depend on them being called in the right order, or in not being
> called too soon.

But isn't the order in which they are called undefined (for cycles)? 
Another option would be to record what callbacks you will do and call 
them after completing the destruction of the cycle.


More information about the Python-Dev mailing list