[issue9417] Declaring a class creates circular references

Terry J. Reedy report at bugs.python.org
Sat Aug 7 17:38:44 CEST 2010


Terry J. Reedy <tjreedy at udel.edu> added the comment:

I am opposed to a new 'unlink' builtin and '__unlink__' special method. There are more than enough builtin functions now, and this need is specific to those who both make lots temporary classes that they need garbage collected AND need to run with gc turned off. The intersection of these two small groups is probably very small. Since turning gc off is only an option with CPython (and PyPy?), this need is also implementation specific.

Before anything were added to the stdlib (and the need *might* be considered too rare for that) it should be tested in real use by more than one person. It appears that there are at least a couple of options for implementing a no_cr class. They could be attached to this issue, posted on the cookbook, or uploaded to PyPI.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9417>
_______________________________________


More information about the Python-bugs-list mailing list