__metaclass__ abcmeta @abstractmethod def method(self)pass either waythe effect is the same--we can' make an instance unless the method is defined lower in the class tree in xfor examplehere is the special syntax equivalent of the prior section' examplefrom abc import abcmetaabstractmethod class super(metaclass=abcmeta)def delegate(self)self action(@abstractmethod def action(self)pass super(typeerrorcan' instantiate abstract class super with abstract methods action class sub(super)pass sub(typeerrorcan' instantiate abstract class sub with abstract methods action class sub(super)def action(self)print('spam' sub( delegate(spam coded this waya class with an abstract method cannot be instantiated (that iswe cannot create an instance by calling itunless all of its abstract methods have been defined in subclasses although this requires more code and extra knowledgethe potential advantage of this approach is that errors for missing methods are issued when we attempt to make an instance of the classnot later when we try to call missing method this feature may also be used to define an expected interfaceautomatically verified in client classes unfortunatelythis scheme also relies on two advanced language tools we have not met yet--function decoratorsintroduced in and covered in depth in as well as metaclass declarationsmentioned in and covered in --so we will finesse other facets of this option here see python' standard manuals for more on thisas well as precoded abstract superclasses python provides inheritance