diff options
author | Daisuke Miyakawa <d.miyakawa@gmail.com> | 2017-10-12 14:39:43 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@users.noreply.github.com> | 2017-10-12 14:39:43 (GMT) |
commit | 0e61e67a57deb4abc677808201d7cf3c38138e02 (patch) | |
tree | 904a042593531964bf0ef25590a34734f86ab508 /Doc/library | |
parent | 277c84067ff5dfa271725ee9da1a9d75a7c0bcd8 (diff) | |
download | cpython-0e61e67a57deb4abc677808201d7cf3c38138e02.zip cpython-0e61e67a57deb4abc677808201d7cf3c38138e02.tar.gz cpython-0e61e67a57deb4abc677808201d7cf3c38138e02.tar.bz2 |
bpo-31567: add or fix decorator markup in docs (#3959)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/abc.rst | 2 | ||||
-rw-r--r-- | Doc/library/functions.rst | 8 | ||||
-rw-r--r-- | Doc/library/functools.rst | 4 | ||||
-rw-r--r-- | Doc/library/test.rst | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/Doc/library/abc.rst b/Doc/library/abc.rst index 6001db3..9522dd6 100644 --- a/Doc/library/abc.rst +++ b/Doc/library/abc.rst @@ -278,7 +278,7 @@ The :mod:`abc` module also provides the following decorators: :func:`abstractmethod`, making this decorator redundant. -.. decorator:: abstractproperty(fget=None, fset=None, fdel=None, doc=None) +.. decorator:: abstractproperty A subclass of the built-in :func:`property`, indicating an abstract property. diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 08093e6..eed6730 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -196,9 +196,9 @@ are always available. They are listed here in alphabetical order. base 16). :exc:`ValueError` will be raised if *i* is outside that range. -.. function:: classmethod(function) +.. decorator:: classmethod - Return a class method for *function*. + Transform a method into a class method. A class method receives the class as implicit first argument, just like an instance method receives the instance. To declare a class method, use this @@ -1398,9 +1398,9 @@ are always available. They are listed here in alphabetical order. For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`. -.. function:: staticmethod(function) +.. decorator:: staticmethod - Return a static method for *function*. + Transform a method into a static method. A static method does not receive an implicit first argument. To declare a static method, use this idiom:: diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst index 9a8defe..28062c1 100644 --- a/Doc/library/functools.rst +++ b/Doc/library/functools.rst @@ -264,9 +264,9 @@ The :mod:`functools` module defines the following functions: return value -.. decorator:: singledispatch(default) +.. decorator:: singledispatch - Transforms a function into a :term:`single-dispatch <single + Transform a function into a :term:`single-dispatch <single dispatch>` :term:`generic function`. To define a generic function, decorate it with the ``@singledispatch`` diff --git a/Doc/library/test.rst b/Doc/library/test.rst index 33978e3..01ba1ec 100644 --- a/Doc/library/test.rst +++ b/Doc/library/test.rst @@ -440,7 +440,7 @@ The :mod:`test.support` module defines the following functions: otherwise. -.. decorator:: skip_unless_symlink() +.. decorator:: skip_unless_symlink A decorator for running tests that require support for symbolic links. |