[Python-ideas] Fwd: Consider allowing the use of abstractmethod without metaclasses

INADA Naoki songofacandy at gmail.com
Thu Jul 20 08:39:11 EDT 2017

Hi, Victor.

> Why not making abc faster instead of trying to workaround abc for perf
> issue?

Current ABC provides:

a) Prohibit instantiating without implement abstract methods.
b) registry based subclassing

People want Java's interface only wants (a).  (b) is unwanted side effect.

Additionally, even if CPython provide C implementation of ABCMeta,
other Python implementations won't.
So Abstract Class (not ABC) may be nice on such implementations too.

I'm +1 to implement abc module in C.
And I think (a) can be nice first step, instead of implement all at once.


INADA Naoki  <songofacandy at gmail.com>

More information about the Python-ideas mailing list