[Python-3000] Removing __del__
mcherm at mcherm.com
Tue Sep 19 14:36:09 CEST 2006
The following comments got me thinking:
> Statistics incontrovertibly prove that people who habitually
> avoid __del__ lead happier lives and spend fewer hours in therapy ;-)
> I agree here. I think an executor approach is much better; kill the
> object, then make a weakref callback do any further cleanups using
> copies it made in advance.
And of course similar sentiments have been proposed in many Python
discussions by many people over several years.
Since we're apparently still in "propose wild ideas" mode for Py3K
I'd like to propose that for Py3K we remove __del__. Not "fix" it,
not "tweak" it, just remove it and perhaps add a note in the manual
pointing people to the weakref module.
What'cha think folks? I'd love to hear an opinion from someone who
is a current user of __del__ -- I'm not.
-- Michael Chermside
More information about the Python-3000