Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc68cb8e

Browse files
authored
Remove outdated note about instance methods from datamodel.rst (#122471)
1 parentaf0a00f commitc68cb8e

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)

[8]ページ先頭

©2009-2025 Movatter.jp