does python have useless destructors?
Michael Hudson
mwh at python.net
Thu Jun 17 13:04:36 EDT 2004
Donn Cave <donn at u.washington.edu> writes:
> In article <m3k6y6o8cd.fsf at pc150.maths.bris.ac.uk>,
> Michael Hudson <mwh at python.net> wrote:
> > Donn Cave <donn at u.washington.edu> writes:
> > > In article <m3fz8xozi1.fsf at pc150.maths.bris.ac.uk>,
> > > Michael Hudson <mwh at python.net> wrote:
> > > > I would urge everyone participating in this thread to read PEP 310,
> > > > the email conversation linked therein and (optional) *understand* it.
> > >
> > > It seems to be superficially similar to finalization,
> >
> > OK, I've found this thread pretty hard to follow. What is
> > "finalization" in context?
>
> Operational definition would be `call __del__ or its C equivalent',
> at the effective end of the object's lifetime.
OK. I claim you can't really have that, and that you don't really
need it anyway. The idea behind PEP 310 is to acheive the ends of
RAII in C++ by different means.
What else do you want to use __del__ methods for?
Cheers,
mwh
--
Counting lines is probably a good idea if you want to print it out
and are short on paper, but I fail to see the purpose otherwise.
-- Erik Naggum, comp.lang.lisp
More information about the Python-list
mailing list