diff options
author | Thomas Grainger <tagrain@gmail.com> | 2024-07-30 19:42:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-30 19:42:25 (GMT) |
commit | c68cb8e0c9bd75ded25578c2fba6469e55a06e93 (patch) | |
tree | ffe78faf824345f0e22904f304a6a270b1c58292 | |
parent | af0a00f022d0fb8f1edb4abdda1bc6b915f0448d (diff) | |
download | cpython-c68cb8e0c9bd75ded25578c2fba6469e55a06e93.zip cpython-c68cb8e0c9bd75ded25578c2fba6469e55a06e93.tar.gz cpython-c68cb8e0c9bd75ded25578c2fba6469e55a06e93.tar.bz2 |
Remove outdated note about instance methods from datamodel.rst (#122471)
-rw-r--r-- | Doc/reference/datamodel.rst | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 144c6f7..2576f9a 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -730,14 +730,7 @@ When an instance method object is derived from a :class:`classmethod` object, th itself, so that calling either ``x.f(1)`` or ``C.f(1)`` is equivalent to calling ``f(C,1)`` where ``f`` is the underlying function. -Note that the transformation from :ref:`function object <user-defined-funcs>` -to instance method -object happens each time the attribute is retrieved from the instance. In -some cases, a fruitful optimization is to assign the attribute to a local -variable and call that local variable. Also notice that this -transformation only happens for user-defined functions; other callable -objects (and all non-callable objects) are retrieved without -transformation. It is also important to note that user-defined functions +It is important to note that user-defined functions which are attributes of a class instance are not converted to bound methods; this *only* happens when the function is an attribute of the class. |