CPython's cyclic garbage collector (was [Python-ideas] Automatic context managers)

Skip Montanaro skip at pobox.com
Fri Apr 26 22:12:22 EDT 2013


>From the Zen of Python:

> In the face of ambiguity, refuse the temptation to guess.

I believe the reason something isn't already done to break cycles is
that the authors of the cyclic garbage collector considered the above
aphorism.  They rely on the author of the code with the cycles to
figure out how to break them.  All I was suggesting was that Python
could provide a hook where the programmer could codify his algorithm
for breaking cycles.

Skip



More information about the Python-list mailing list