No destructor
Pete Shinners
pete at visionart.com
Mon Aug 21 16:48:59 EDT 2000
"Makhno" <mak at imakhno.freeserve.co.uk> wrote
> >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?
>
> The method is called __del__
be aware that there are cases where the destructor will never
be called. i can't remember what they are (don't have my book
in front of me). but i do remember reading they weren't
guaranteed to be called, and there were a couple of cases.
because of this i've never been able to let myself rely on
the __del__ destructor. (will it be called???) will the new
garbage cleanup in 2.0 fix this problem?
More information about the Python-list
mailing list