abc.abstractclassmethod()

@abc.abstractclassmethod

A subclass of the built-in classmethod(), indicating an abstract classmethod. Otherwise it is similar to abstractmethod().

This special case is deprecated, as the classmethod() decorator is now correctly identified as abstract when applied to an abstract method:

class C(metaclass=ABCMeta):
    @classmethod
    @abstractmethod
    def my_abstract_classmethod(cls, ...):
        ...

New in version 3.2.

Deprecated since version 3.3: It is now possible to use classmethod with abstractmethod(), making this decorator redundant.

doc_python
2016-10-07 17:26:04
Comments
Leave a Comment

Please login to continue.