mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
[3.12] gh-101100: Improve documentation for attributes on instance methods (GH-112832) (#112872)
gh-101100: Improve documentation for attributes on instance methods (GH-112832)
(cherry picked from commit ed21d0c1f4
)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
parent
7ef3a1e64b
commit
b39e90e4d1
6 changed files with 75 additions and 40 deletions
|
@ -769,8 +769,10 @@ data from a string buffer instead, and pass it as an argument.
|
|||
or arithmetic operators, and assigning such a "pseudo-file" to sys.stdin will
|
||||
not cause the interpreter to read further input from it.)
|
||||
|
||||
Instance method objects have attributes, too: ``m.__self__`` is the instance
|
||||
object with the method :meth:`!m`, and ``m.__func__`` is the function object
|
||||
:ref:`Instance method objects <instance-methods>` have attributes, too:
|
||||
:attr:`m.__self__ <method.__self__>` is the instance
|
||||
object with the method :meth:`!m`, and :attr:`m.__func__ <method.__func__>` is
|
||||
the :ref:`function object <user-defined-funcs>`
|
||||
corresponding to the method.
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue