diff options
author | Alex Waygood <Alex.Waygood@Gmail.com> | 2023-12-08 13:18:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-08 13:18:53 (GMT) |
commit | ed21d0c1f4bd17b392e24bfd83e652723dad4ddf (patch) | |
tree | e9fde7764802e61c8273e192eba35eb0fd6d3687 /Doc/tutorial | |
parent | e4c087603397a1314253b861d35f8314fba8ae92 (diff) | |
download | cpython-ed21d0c1f4bd17b392e24bfd83e652723dad4ddf.zip cpython-ed21d0c1f4bd17b392e24bfd83e652723dad4ddf.tar.gz cpython-ed21d0c1f4bd17b392e24bfd83e652723dad4ddf.tar.bz2 |
gh-101100: Improve documentation for attributes on instance methods (#112832)
Diffstat (limited to 'Doc/tutorial')
-rw-r--r-- | Doc/tutorial/classes.rst | 6 |
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. |