From 9ce51d59508f2378f2a4f8af5e284ecdd79cbcaa Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Mon, 8 Mar 2021 13:22:36 -0800 Subject: [PATCH] bpo-43427: Separte the method overview from the static method specifics. --- Doc/howto/descriptor.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst index 94a8b4e6b40b96..94aadd6f73a837 100644 --- a/Doc/howto/descriptor.rst +++ b/Doc/howto/descriptor.rst @@ -1139,8 +1139,8 @@ If you have ever wondered where *self* comes from in regular methods or where *cls* comes from in class methods, this is it! -Static methods --------------- +Other kinds of methods +---------------------- Non-data descriptors provide a simple mechanism for variations on the usual patterns of binding functions into methods. @@ -1163,6 +1163,10 @@ This chart summarizes the binding and its two most useful variants: | classmethod | f(type(obj), \*args) | f(cls, \*args) | +-----------------+----------------------+------------------+ + +Static methods +-------------- + Static methods return the underlying function without changes. Calling either ``c.f`` or ``C.f`` is the equivalent of a direct lookup into ``object.__getattribute__(c, "f")`` or ``object.__getattribute__(C, "f")``. As a