Python abc module: Extending both an abstract base class and an exception-derived class leads to surprising behavior
问题 Extending both an abstract base class and a class derived from "object" works as you would expect: if you you haven't implemented all abstract methods and properties, you get an error. Strangely, replacing the object-derived class with an class that extends "Exception" allows you to create instances of classes which do not implement all the required abstract methods and properties. For example: import abc # The superclasses class myABC( object ): __metaclass__ = abc.ABCMeta @abc