summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-12-08 13:25:52 (GMT)
committerGitHub <noreply@github.com>2023-12-08 13:25:52 (GMT)
commitb39e90e4d188729561c19195b1b0b79eabec540b (patch)
tree6aab46b4aef4baaa97359dcf865df768d0089794 /Doc/tutorial
parent7ef3a1e64b745aafb596fcbdbdae3b688c2cccc7 (diff)
downloadcpython-b39e90e4d188729561c19195b1b0b79eabec540b.zip
cpython-b39e90e4d188729561c19195b1b0b79eabec540b.tar.gz
cpython-b39e90e4d188729561c19195b1b0b79eabec540b.tar.bz2
[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 ed21d0c1f4bd17b392e24bfd83e652723dad4ddf) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Diffstat (limited to 'Doc/tutorial')
-rw-r--r--Doc/tutorial/classes.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst
index 7b92e1a..3bf138c 100644
--- a/Doc/tutorial/classes.rst
+++ b/Doc/tutorial/classes.rst
@@ -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.