User-defined base classes can raise NotImplementedError to indicate that a method or behavior needs to be defined by a subclass, simulating an interface. This exception is derived from RuntimeError. In user defined base classes, abstract methods should raise this exception when they require derived classes to override the method.
Example
import sys try: class Super(object): @property def example(self): raise NotImplementedError("Subclasses should implement this!") s = Super() print s.example except Exception as e: print e print sys.exc_type
Output
Subclasses should implement this! <type 'exceptions.NotImplementedError'>