[Python-ideas] Hooks into the IO system to intercept raw file reads/writes

Nick Coghlan ncoghlan at gmail.com
Thu Feb 5 11:53:15 CET 2015


On 5 February 2015 at 15:05, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Guido van Rossum wrote:
>>
>> Well, there is a lot of I/O machinery that keeps itself alive unless you
>> explicitly close it. So __del__ is unlikely to be called until it's too late
>> (at the dreaded module teardown stage).
>
>
> I thought we weren't doing module teardown any more?

It's still there as a last resort. The thing that changed is that
__del__ methods don't necessarily prevent cycle collection any more,
so more stuff should be cleaned up nicely by the cyclic GC before we
hit whatever is left with the module cleanup hammer.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-ideas mailing list