diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-08-17 00:52:52 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-08-17 00:52:52 (GMT) |
commit | 45c257f193ddb8dfd54a0edb7253ee9254329ab7 (patch) | |
tree | 18b04c290ba0aadda9392a63bdebb2e1f64b9718 /Doc | |
parent | 36e791179c3bb49d45a17c27fbc39ec9b2a8694f (diff) | |
download | cpython-45c257f193ddb8dfd54a0edb7253ee9254329ab7.zip cpython-45c257f193ddb8dfd54a0edb7253ee9254329ab7.tar.gz cpython-45c257f193ddb8dfd54a0edb7253ee9254329ab7.tar.bz2 |
add support for abstract class and static methods #5867
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/abc.rst | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Doc/library/abc.rst b/Doc/library/abc.rst index 5e87e96..319b164 100644 --- a/Doc/library/abc.rst +++ b/Doc/library/abc.rst @@ -157,6 +157,32 @@ It also provides the following decorators: multiple-inheritance. +.. decorator:: abstractclassmethod(function) + + A subclass of the built-in :func:`classmethod`, indicating an abstract + classmethod. Otherwise it is similar to :func:`abstractmethod`. + + Usage:: + + class C(metaclass=ABCMeta): + @abstractclassmethod + def my_abstract_classmethod(cls, ...): + ... + + +.. decorator:: abstractstaticmethod(function) + + A subclass of the built-in :func:`staticmethod`, indicating an abstract + staticmethod. Otherwise it is similar to :func:`abstractmethod`. + + Usage:: + + class C(metaclass=ABCMeta): + @abstractstaticmethod + def my_abstract_staticmethod(...): + ... + + .. function:: abstractproperty(fget=None, fset=None, fdel=None, doc=None) A subclass of the built-in :func:`property`, indicating an abstract property. |