Skip to content

Commit b337248

Browse files
gh-117903: Clarify that the staticmethod descriptor is callable (GH-117925)
1 parent 7d2ffad commit b337248

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/library/functions.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1733,8 +1733,9 @@ are always available. They are listed here in alphabetical order.
17331733
:ref:`function` for details.
17341734

17351735
A static method can be called either on the class (such as ``C.f()``) or on
1736-
an instance (such as ``C().f()``). Moreover, they can be called as regular
1737-
functions (such as ``f()``).
1736+
an instance (such as ``C().f()``).
1737+
Moreover, the static method :term:`descriptor` is also callable, so it can
1738+
be used in the class definition (such as ``f()``).
17381739

17391740
Static methods in Python are similar to those found in Java or C++. Also, see
17401741
:func:`classmethod` for a variant that is useful for creating alternate class

0 commit comments

Comments
 (0)