2009/5/5 Francesco Cosoleto <[email protected]>:
> [email protected] ha scritto:
>> Revision: 6808
>> Author:   nicdumz
>> Date:     2009-05-03 17:38:53 +0000 (Sun, 03 May 2009)
>>
>> Log Message:
>> -----------
>> Follow-up to r6797 & r6802: importing os in diskcache.delete is _necessary_
>> Documenting the reasons, so it doesnt get deleted a second time ;)
>
> Thank you for taking care of my errors.
>
> What is the reason of the "delete" name for this function? "__del__"
> looks better, as I can see there are case where delete() isn't called.

The exact same question popped in my mind when I fixed the error. I
think that it is not guaranteed that __del__ always get called on
interpreter exit, and that for this reason it is better not to rely on
__del__ for cleanups.

But I can't find more details than the simple "It is not guaranteed
that __del__() methods are called for objects that still [...]" from
the Python documentation =))

-- 
Nicolas Dumazet — NicDumZ [ nɪk.d̪ymz ]

_______________________________________________
Pywikipedia-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l

Reply via email to