Skip to content

Commit

Permalink
[3.6] bpo-31567: add or fix decorator markup in docs (pythonGH-3959)
Browse files Browse the repository at this point in the history
(cherry picked from commit 0e61e67)
  • Loading branch information
dmiyakawa authored and miss-islington committed Oct 12, 2017
1 parent 5f90800 commit 55af60f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Doc/library/abc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions Doc/library/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,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
Expand Down Expand Up @@ -1384,9 +1384,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::
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/functools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/test.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 55af60f

Please sign in to comment.