@@ -1619,8 +1619,9 @@ are always available. They are listed here in alphabetical order.
16191619 The ``@staticmethod `` form is a function :term: `decorator ` -- see
16201620 :ref: `function ` for details.
16211621
1622- A static method can be called either on the class (such as ``C.f() ``) or on an instance (such
1623- as ``C().f() ``).
1622+ A static method can be called either on the class (such as ``C.f() ``) or on
1623+ an instance (such as ``C().f() ``). Moreover, they can be called as regular
1624+ functions (such as ``f() ``).
16241625
16251626 Static methods in Python are similar to those found in Java or C++. Also see
16261627 :func: `classmethod ` for a variant that is useful for creating alternate class
@@ -1632,15 +1633,19 @@ are always available. They are listed here in alphabetical order.
16321633 body and you want to avoid the automatic transformation to instance
16331634 method. For these cases, use this idiom::
16341635
1636+ def regular_function():
1637+ ...
1638+
16351639 class C:
1636- builtin_open = staticmethod(open )
1640+ method = staticmethod(regular_function )
16371641
16381642 For more information on static methods, see :ref: `types `.
16391643
16401644 .. versionchanged :: 3.10
16411645 Static methods now inherit the method attributes (``__module__ ``,
1642- ``__name__ ``, ``__qualname__ ``, ``__doc__ `` and ``__annotations__ ``) and
1643- have a new ``__wrapped__ `` attribute.
1646+ ``__name__ ``, ``__qualname__ ``, ``__doc__ `` and ``__annotations__ ``),
1647+ have a new ``__wrapped__ `` attribute, and are now callable as regular
1648+ functions.
16441649
16451650
16461651.. index ::
0 commit comments