Skip to content

Commit 8c8e4b4

Browse files
author
Daisuke Miyakawa
committed
bpo-31567: Use decorator markup for staticmethod()/classmethod()
1 parent 02e82a0 commit 8c8e4b4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Doc/library/functions.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ are always available. They are listed here in alphabetical order.
196196
base 16). :exc:`ValueError` will be raised if *i* is outside that range.
197197

198198

199-
.. function:: classmethod(function)
199+
.. decorator:: classmethod
200200

201-
Return a class method for *function*.
201+
Transforms a method into a class method.
202202

203203
A class method receives the class as implicit first argument, just like an
204204
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.
13981398

13991399
For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`.
14001400

1401-
.. function:: staticmethod(function)
1401+
.. decorator:: staticmethod
14021402

1403-
Return a static method for *function*.
1403+
Transforms a method into a static method.
14041404

14051405
A static method does not receive an implicit first argument. To declare a static
14061406
method, use this idiom::

0 commit comments

Comments
 (0)