[Python-Dev] Combining the best of PEP 288 and PEP 325: generator exceptions and cleanup

Greg Ewing greg.ewing at canterbury.ac.nz
Thu May 19 08:09:33 CEST 2005


Guido van Rossum wrote:

> - When a generator is GC'ed, its close() method is called (which is a
> no-op if it is already closed).

Does this mean that all generators will be ineligible
for cyclic garbage collection (since they implicitly
have something equivalent to a __del__ method)?

Other than that, all this looks good.

-- 
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+


More information about the Python-Dev mailing list