[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:
Miss Islington (bot) 2023-12-08 14:25:52 +01:00 committed by GitHub
parent 7ef3a1e64b
commit b39e90e4d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 75 additions and 40 deletions

View file

@ -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.