from abc import * class A: pass # instanciation fails properly when deriving from A instead class B(Exception, metaclass=ABCMeta): @abstractmethod def x(self): """You must implement this""" class C(B): pass c = C()