Skip to content

Commit f00e82f

Browse files
authored
bpo-43427: Separte the method overview from the static method specifics. (GH-24787)
1 parent f917efc commit f00e82f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Doc/howto/descriptor.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,8 +1139,8 @@ If you have ever wondered where *self* comes from in regular methods or where
11391139
*cls* comes from in class methods, this is it!
11401140

11411141

1142-
Static methods
1143-
--------------
1142+
Other kinds of methods
1143+
----------------------
11441144

11451145
Non-data descriptors provide a simple mechanism for variations on the usual
11461146
patterns of binding functions into methods.
@@ -1163,6 +1163,10 @@ This chart summarizes the binding and its two most useful variants:
11631163
| classmethod | f(type(obj), \*args) | f(cls, \*args) |
11641164
+-----------------+----------------------+------------------+
11651165

1166+
1167+
Static methods
1168+
--------------
1169+
11661170
Static methods return the underlying function without changes. Calling either
11671171
``c.f`` or ``C.f`` is the equivalent of a direct lookup into
11681172
``object.__getattribute__(c, "f")`` or ``object.__getattribute__(C, "f")``. As a

0 commit comments

Comments
 (0)