Skip to content

Commit c68cb8e

Browse files
authored
Remove outdated note about instance methods from datamodel.rst (#122471)
1 parent af0a00f commit c68cb8e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

Doc/reference/datamodel.rst

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -730,14 +730,7 @@ When an instance method object is derived from a :class:`classmethod` object, th
730730
itself, so that calling either ``x.f(1)`` or ``C.f(1)`` is equivalent to
731731
calling ``f(C,1)`` where ``f`` is the underlying function.
732732

733-
Note that the transformation from :ref:`function object <user-defined-funcs>`
734-
to instance method
735-
object happens each time the attribute is retrieved from the instance. In
736-
some cases, a fruitful optimization is to assign the attribute to a local
737-
variable and call that local variable. Also notice that this
738-
transformation only happens for user-defined functions; other callable
739-
objects (and all non-callable objects) are retrieved without
740-
transformation. It is also important to note that user-defined functions
733+
It is important to note that user-defined functions
741734
which are attributes of a class instance are not converted to bound
742735
methods; this *only* happens when the function is an attribute of the
743736
class.

0 commit comments

Comments
 (0)