[Python-Dev] Re: [Python-checkins]python/dist/src/Modules gcmodule.c,22.214.171.124,126.96.36.199
Guido van Rossum
Tue, 08 Apr 2003 14:06:47 -0400
> This further confirms my opinion that __del__ methods are evil, and
> the language would be the better for their complete removal.
No can do. There must be a way to force e.g. calling os.close() for
an integer file descriptor returned by os.open() without writing C
code. But this should be exceedingly rare.
A quick inspection of the standard library found one other case:
flushing buffered data out. I think that's also a valid use of
> Failing that, perhaps they should be made a bit less dynamic, so
> that the GC can make reasonable assumptions about their existence
> without having to execute Python code.
--Guido van Rossum (home page: http://www.python.org/~guido/)