Author pitrou
Recipients kristjan.jonsson, pitrou, vstinner
Date 2013-05-13.10:21:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1258170106.35637465.1368440471433.JavaMail.root@zimbra10-e2.priv.proxad.net>
In-reply-to <1368440129.21.0.9865725643.issue17936@psf.upfronthosting.co.za>
Content
> 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.

remove_subclass() is called when __bases__ is assigned to, so it is
not irrelevant:

>>> class A: pass
... 
>>> class B(A): pass
... 
>>> class C: pass
... 
>>> A.__subclasses__()
[<class '__main__.B'>]
>>> B.__bases__ = C,
>>> A.__subclasses__()
[]
>>> C.__subclasses__()
[<class '__main__.B'>]
History
Date User Action Args
2013-05-13 10:21:18pitrousetrecipients: + pitrou, kristjan.jonsson, vstinner
2013-05-13 10:21:18pitroulinkissue17936 messages
2013-05-13 10:21:18pitroucreate