]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-117903: Clarify that the staticmethod descriptor is callable (GH-117925...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 2 May 2024 14:02:26 +0000 (16:02 +0200)
committerGitHub <noreply@github.com>
Thu, 2 May 2024 14:02:26 +0000 (14:02 +0000)
(cherry picked from commit b3372481b6cae5766330b041c4622c28cee2119f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Doc/library/functions.rst

index fdc960c01d54b2f6c5c1658869a5c7c094a2da32..7edcd5d5ac21bc5e0a8b345c09947ec4d23eb385 100644 (file)
@@ -1723,8 +1723,9 @@ are always available.  They are listed here in alphabetical order.
    :ref:`function` for details.
 
    A static method can be called either on the class (such as ``C.f()``) or on
-   an instance (such as ``C().f()``). Moreover, they can be called as regular
-   functions (such as ``f()``).
+   an instance (such as ``C().f()``).
+   Moreover, the static method :term:`descriptor` is also callable, so it can
+   be used in the class definition (such as ``f()``).
 
    Static methods in Python are similar to those found in Java or C++. Also, see
    :func:`classmethod` for a variant that is useful for creating alternate class