[Python-3000] Removing __del__

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Sep 21 03:34:14 CEST 2006

Jim Jewett wrote:

> How do you feel about the __del__ in stdlib subprocess.Popen (about line 615)?
> This resurrects itself, in order to finish waiting for the child
> process.

I don't see a need for resurrection here. Why can't it
create another object holding the necessary info for
doing the waiting?

> (And note that if it needed to revive (not recreate, revive)
> subobjects, it would need the full immortal-cycle power of today's
> __del__.

Any subobjects which may need to be preserved can be
passed as arguments to the finalizer, which can then
prevent them from dying in the first place if it wants.

I'm far from convinced that there's ever a *need* for


More information about the Python-3000 mailing list