[issue17936] O(n**2) behaviour when adding/removing classes

Kristján Valur Jónsson report at bugs.python.org
Mon May 13 12:15:29 CEST 2013


Kristján Valur Jónsson added the comment:

Basically the logic is this:  When the class goes away, it _always_ calls remove_subclass().  Now, this may be before or after the weakref has been clear so that it will either find itself in a weakref, or a clear weakref.

In case this logic is flawed, we know that when remove_subclass() is called, exactly one child is removed.  Whether it is us, or some previous class, is irrelevant.

----------

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


More information about the Python-bugs-list mailing list