Commit 0e61e67a authored by Daisuke Miyakawa's avatar Daisuke Miyakawa Committed by Éric Araujo

bpo-31567: add or fix decorator markup in docs (#3959)

parent 277c8406
...@@ -278,7 +278,7 @@ The :mod:`abc` module also provides the following decorators: ...@@ -278,7 +278,7 @@ The :mod:`abc` module also provides the following decorators:
:func:`abstractmethod`, making this decorator redundant. :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 A subclass of the built-in :func:`property`, indicating an abstract
property. property.
......
...@@ -196,9 +196,9 @@ are always available. They are listed here in alphabetical order. ...@@ -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. 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 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 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. ...@@ -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`. 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 A static method does not receive an implicit first argument. To declare a static
method, use this idiom:: method, use this idiom::
......
...@@ -264,9 +264,9 @@ The :mod:`functools` module defines the following functions: ...@@ -264,9 +264,9 @@ The :mod:`functools` module defines the following functions:
return value 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`. dispatch>` :term:`generic function`.
To define a generic function, decorate it with the ``@singledispatch`` To define a generic function, decorate it with the ``@singledispatch``
......
...@@ -440,7 +440,7 @@ The :mod:`test.support` module defines the following functions: ...@@ -440,7 +440,7 @@ The :mod:`test.support` module defines the following functions:
otherwise. otherwise.
.. decorator:: skip_unless_symlink() .. decorator:: skip_unless_symlink
A decorator for running tests that require support for symbolic links. A decorator for running tests that require support for symbolic links.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment