[Python-Dev] anonymous blocks

Guido van Rossum gvanrossum at gmail.com
Fri Apr 22 02:34:31 CEST 2005


[Brett]
> I think I agree with Samuele that it would be more pertinent to put all of this
> effort into trying to come up with some way to handle cleanup in a generator.

I.e. PEP 325.

But (as I explained, and you agree) that still doesn't render PEP 310
unnecessary, because abusing the for-loop for implied cleanup
semantics is ugly and expensive, and would change generator semantics;
and it bugs me that the finally clause's reachability depends on the
destructor executing.

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


More information about the Python-Dev mailing list