Skip to content

Commit

Permalink
bpo-31567: Use decorator markup for staticmethod()/classmethod()
Browse files Browse the repository at this point in the history
  • Loading branch information
Daisuke Miyakawa committed Oct 12, 2017
1 parent 02e82a0 commit 8c8e4b4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Doc/library/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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*.
Transforms 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 @@ -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*.
Transforms 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

0 comments on commit 8c8e4b4

Please sign in to comment.