Vladimir

44%
Flag icon
Besides the ABC base class, and the @abstractmethod decorator, the abc module defines the @abstractclassmethod, @abstractstaticmethod, and @abstractproperty decorators. However, these last three were deprecated in Python 3.3, when it became possible to stack decorators on top of @abstractmethod, making the others redundant. For example, the preferred way to declare an abstract class method is: class MyABC(abc.ABC):     @classmethod     @abc.abstractmethod     def an_abstract_classmethod(cls, ...):         pass
Fluent Python: Clear, Concise, and Effective Programming
Rate this book
Clear rating
Open Preview