class SomeAbstractClass(object, metaclass=ABCMeta):
    pass

@abstractmethod
def this_method_must_be_overridden(self):
    return 'But it can have an implementation (callable via super).'


class ConcreteSubclass(SomeAbstractClass):

    def this_method_must_be_overridden(self):
        s = super(ConcreteSubclass, self).this_method_must_be_overridden()
return s.replace('can', 'does').replace(' (callable via super)', '')
Абстрактные классы Python – как предотвратить создание экземпляров?