[issue17936] O(n**2) behaviour when adding/removing classes
Antoine Pitrou
report at bugs.python.org
Mon May 13 12:26:31 CEST 2013
Antoine Pitrou added the comment:
> The second one is when the class is being deleted, for housekeeping
> of the weakrefs.
> I worry that your alternative will cause us to walk the entire list
> in the second case because it will be called when the weakref has
> been cleared, so it will never find itself in the list, only None.
I don't think that matters much. In both cases the expected complexity
is O(n).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17936>
_______________________________________
More information about the Python-bugs-list
mailing list