]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-117903: Clarify that the staticmethod descriptor is callable (GH-117925)
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 2 May 2024 13:56:33 +0000 (16:56 +0300)
committerGitHub <noreply@github.com>
Thu, 2 May 2024 13:56:33 +0000 (16:56 +0300)
Doc/library/functions.rst

index e598ef423de4972a679286e8ee8c578d7ca0827d..be3a64cf41b425a36251a7a874063c0846b76484 100644 (file)
@@ -1733,8 +1733,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