Body of abstract method in Python 3.5 [duplicate]
问题 This question already has an answer here : What should I put in the body of an abstract method in Python (1 answer) Closed 2 years ago . I have an abstract class, Model , with a few abstract methods, what should I put in the body of the methods? A return class Model(metaclass=ABCMeta): @abstractmethod def foo(self): return A pass class Model(metaclass=ABCMeta): @abstractmethod def foo(self): pass Raising a descriptive error class Model(metaclass=ABCMeta): @abstractmethod def foo(self): raise