[Python-ideas] ABCs : adding an implements alias ?

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Feb 21 23:16:32 CET 2009

Tarek Ziadé wrote:

> I am playing with ABCs and I don't find the usage of the built-in
> issubclass() natural to test wheter a class implements an ABC.

One of the main points of ABCs, as I understand things,
is so that you can declare a class as being a subclass
of something "after the fact", and thus fool existing
code that uses isinstance and issubclass tests into
treating your objects in a duck-typed way.

Requiring a different function to test for ABC
inheritance would defeat that.


More information about the Python-ideas mailing list