Class destructors
Graham Ashton
graham at coms.com
Wed Jun 20 06:42:36 EDT 2001
In article <9gpu9t$7e6$1 at norfair.nerim.net>, "Gilles Lenfant"
<glenfant.nospam at bigfoot.com> wrote:
> Just add a "__del__(self):" method in your class to make a custom
> cleanup (close file, socket...).
>
> It's perhaps what you need.
> More info at...
> http://www.python.org/doc/current/ref/customization.html
Ah, thanks. Perhaps I mis-interpreted the tutorial when it said:
>> "There are no special constructors or destructors."
In other words, perhaps I shouldn't have ignore the word "special".
--
Graham
More information about the Python-list
mailing list