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 pitrou
Recipients christian.heimes, pitrou, rhettinger, stutzbach
Date 2013-08-14.13:47:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1921401657.62182355.1376488029256.JavaMail.root@zimbra10-e2.priv.proxad.net>
In-reply-to <1376487589.58.0.579762386816.issue18737@psf.upfronthosting.co.za>
Content
> It's called get_VIRTUAL_subclasses() for a reason. You can get the
> real subclasses of an ABC with standard tool, e.g. recurse into
> __subclasses__().

What use case are you trying to solve? If I want to find out all classes
which implement an ABC, I don't care whether they implement it "virtually"
or not. OTOH, I do care that the results are stable and reliable, i.e.
that they don't change when someone changes from virtual inheritance to
real inheritance as an implementation detail.

For comparison, issubclass() doesn't make a difference between real and
virtual subclasses, or direct and recursive.

> For virtual subclasses you have to deal with the
> internals like _abc_registry. I could implement all four cases:
> recurse True/False, only virtual True/False.

I don't care about all four cases. What I'm saying is that only
"recurse=True, only virtual=False" makes sense from an user's POV.
History
Date User Action Args
2013-08-14 13:47:15pitrousetrecipients: + pitrou, rhettinger, christian.heimes, stutzbach
2013-08-14 13:47:15pitroulinkissue18737 messages
2013-08-14 13:47:15pitroucreate