ABC classes are created to check object type and as such they cannot be instantiated. In fact:
basestring()
throws:
TypeError: The basestring type cannot be instantiated
However, this does not happen for the ABC number:
from numbers import number
number()
it does not throw any exceptions. Whereas other ABCs from the same module do:
from numbers import Real
from numbers import Complex
Real() # or Complex()
throws:
TypeError: Can't instantiate abstract class Real with abstract methods __abs__, __add__, __div__, __eq__, __float__, __floordiv__, __le__, __lt__, __mod__, __mul__, __neg__, __pos__, __pow__, __radd__, __rdiv__, __rfloordiv__, __rmod__, __rmul__, __rpow__, __rtruediv__, __truediv__, __trunc__
Why is that ?