No destructor
Alex Martelli
alex at magenta.com
Mon Aug 21 17:44:22 EDT 2000
"peter.foreman" <peter.foreman at tinyworld.co.uk> wrote in message
news:39a1711d_2 at news2.vip.uk.com...
> Hi,
> I'm fairly new to Python, so apologies if this has cropped up before. As
I
> understand it, there is no destructor/finalise in Python. What was the
> reason behind this omission?
If a class defines a __del__ method, that is exactly the destructor aka
finalizer for its instances. The __del__ for base classes, if any, must
be explicitly called (just like for the __init__, aka constructor).
Alex
More information about the Python-list
mailing list