Skip to content

Commit 45d9c8c

Browse files
bpo-43427: Separte the method overview from the static method specifics. (GH-24787) (GH-24849)
1 parent bb46c13 commit 45d9c8c

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
@@ -1129,8 +1129,8 @@ If you have ever wondered where *self* comes from in regular methods or where
11291129
*cls* comes from in class methods, this is it!
11301130

11311131

1132-
Static methods
1133-
--------------
1132+
Other kinds of methods
1133+
----------------------
11341134

11351135
Non-data descriptors provide a simple mechanism for variations on the usual
11361136
patterns of binding functions into methods.
@@ -1153,6 +1153,10 @@ This chart summarizes the binding and its two most useful variants:
11531153
| classmethod | f(type(obj), \*args) | f(cls, \*args) |
11541154
+-----------------+----------------------+------------------+
11551155

1156+
1157+
Static methods
1158+
--------------
1159+
11561160
Static methods return the underlying function without changes. Calling either
11571161
``c.f`` or ``C.f`` is the equivalent of a direct lookup into
11581162
``object.__getattribute__(c, "f")`` or ``object.__getattribute__(C, "f")``. As a

0 commit comments

Comments
 (0)