diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-01-16 16:43:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-16 16:43:23 (GMT) |
commit | d42e54e9d60b3343b48458faa2ab10ac9de78889 (patch) | |
tree | 8c7689575a1c9b35fde6806629fe66bc4a3b77ea | |
parent | e5ae15f0fe647d6c4fb89c418e759f9ff6efa86d (diff) | |
download | cpython-d42e54e9d60b3343b48458faa2ab10ac9de78889.zip cpython-d42e54e9d60b3343b48458faa2ab10ac9de78889.tar.gz cpython-d42e54e9d60b3343b48458faa2ab10ac9de78889.tar.bz2 |
[3.11] gh-114069: Revise Tutorial Methods paragraph (GH-114127) (#114132)
gh-114069: Revise Tutorial Methods paragraph (GH-114127)
Remove excess words in the first and third sentences.
(cherry picked from commit 31a2543c80e1e38c97e50533249d9aa00e2f6cae)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
-rw-r--r-- | Doc/tutorial/classes.rst | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst index 734ec23..ae3ffd3 100644 --- a/Doc/tutorial/classes.rst +++ b/Doc/tutorial/classes.rst @@ -386,12 +386,11 @@ general, calling a method with a list of *n* arguments is equivalent to calling the corresponding function with an argument list that is created by inserting the method's instance object before the first argument. -If you still don't understand how methods work, a look at the implementation can -perhaps clarify matters. When a non-data attribute of an instance is -referenced, the instance's class is searched. If the name denotes a valid class -attribute that is a function object, a method object is created by packing -(pointers to) the instance object and the function object just found together in -an abstract object: this is the method object. When the method object is called +In general, methods work as follows. When a non-data attribute +of an instance is referenced, the instance's class is searched. +If the name denotes a valid class attribute that is a function object, +references to both the instance object and the function object +are packed into a method object. When the method object is called with an argument list, a new argument list is constructed from the instance object and the argument list, and the function object is called with this new argument list. |