diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-05-02 14:02:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-02 14:02:26 (GMT) |
commit | f61de0de649d31a96bacb7625d6a7b98d23b14bb (patch) | |
tree | 7e9174daff9876ea4c5f2e69dae3e2ad45023202 /Doc/library | |
parent | c48e0ef7dd13457799e7586f64682da672663c70 (diff) | |
download | cpython-f61de0de649d31a96bacb7625d6a7b98d23b14bb.zip cpython-f61de0de649d31a96bacb7625d6a7b98d23b14bb.tar.gz cpython-f61de0de649d31a96bacb7625d6a7b98d23b14bb.tar.bz2 |
[3.12] gh-117903: Clarify that the staticmethod descriptor is callable (GH-117925) (GH-118509)
(cherry picked from commit b3372481b6cae5766330b041c4622c28cee2119f)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/functions.rst | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index fdc960c..7edcd5d 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -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 |