[Python-Dev] Re: Object finalization for local (ie function) scopes

Guido van Rossum guido at python.org
Tue Jun 15 17:40:26 EDT 2004

> My only problem with PEP 310 is that the solution it proposes doesn't
> address the problem that the user of a class still needs to be the one to
> take care of ordering cleanup. So I would have prefered something that the
> coder of a class uses to tell the interpreter "any instance of this object
> needs deterministic cleanup", so the user can just be carefree when using
> that class.

This is a fallacy, because the user still has to order the cleanup by
using the correct decorator.  We can't afford to decorate *every*
function with this mechanism (method calls are already too expensive).

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-Dev mailing list