Mark Dickinson added the comment:

An addendum: I'd note that avoiding reference cycles altogether is hard in 
modern-day Python. For example, any dynamically-created class creates a 
reference cycle between the class and its MRO:

>>> import gc
>>> gc.disable()
>>> gc.collect()
0
>>> class A(object):
...     pass
... 
>>> del A
>>> gc.collect()
6

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29671>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to