abc.abstractstaticmethod()

@abc.abstractstaticmethod

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

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

class C(metaclass=ABCMeta):
    @staticmethod
    @abstractmethod
    def my_abstract_staticmethod(...):
        ...

New in version 3.2.

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

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

Please login to continue.