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

Michael Hudson mwh at python.net
Thu May 19 20:18:36 CEST 2005


"Phillip J. Eby" <pje at telecommunity.com> writes:

> However, Tim's new post brings up a different issue: if the collector can't 
> tell the difference between a cycle participant and an object that's only 
> reachable from a cycle,

Uh, that's not what he meant:

/>> class C:
|..  def __del__(self):
|..   print 'bye'
\__ 
->> a = [C()]
->> a.append(a)
->> del a
->> gc.collect()
bye
1

Cheers,
mwh


-- 
  Now this is what I don't get.  Nobody said absolutely anything
  bad about anything.  Yet it is always possible to just pull
  random flames out of ones ass.
         -- http://www.advogato.org/person/vicious/diary.html?start=60


More information about the Python-Dev mailing list