This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kristjan.jonsson
Recipients kristjan.jonsson, pitrou, vstinner
Date 2013-05-13.10:21:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
There are two cases when remove_subclass is called:
One when we are changing base classes(the original use of this function), and in this case we must find the correct one.

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'll make some tests to verify.

I think perhaps a small adjustment, an "exact" flag or something, can be added to differentiate between the two cases....
Date User Action Args
2013-05-13 10:21:23kristjan.jonssonsetrecipients: + kristjan.jonsson, pitrou, vstinner
2013-05-13 10:21:23kristjan.jonssonsetmessageid: <>
2013-05-13 10:21:23kristjan.jonssonlinkissue17936 messages
2013-05-13 10:21:23kristjan.jonssoncreate