Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-31567: Use decorator markup for staticmethod()/classmethod() #3959

Merged
merged 4 commits into from
Oct 12, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
bpo-31567: Use decorator markup for staticmethod()/classmethod()
  • Loading branch information
Daisuke Miyakawa committed Oct 12, 2017
commit 8c8e4b45df29fc53771e9d205be831616859bde5
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