summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2016-12-18 20:00:23 (GMT)
committerR David Murray <rdmurray@bitdance.com>2016-12-18 20:00:23 (GMT)
commitcd259bfd5acd7927caaa5a61d4dbe4894389f0cf (patch)
tree9cdbe22b0b03c095f22bc4045b5cbdb522fc668a /Doc/tutorial
parent59b0eb524f6b476db0805ba0a83661122a3fa2fe (diff)
parent4ec1590fbf584cbe328230c7b06c64db9b6e3842 (diff)
downloadcpython-cd259bfd5acd7927caaa5a61d4dbe4894389f0cf.zip
cpython-cd259bfd5acd7927caaa5a61d4dbe4894389f0cf.tar.gz
cpython-cd259bfd5acd7927caaa5a61d4dbe4894389f0cf.tar.bz2
Merge: #29005: clarify terminology in tutorial 'method' discussion.
Diffstat (limited to 'Doc/tutorial')
-rw-r--r--Doc/tutorial/classes.rst5
1 files changed, 2 insertions, 3 deletions
diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst
index 75c79d2..e134d5d 100644
--- a/Doc/tutorial/classes.rst
+++ b/Doc/tutorial/classes.rst
@@ -374,11 +374,11 @@ Surely Python raises an exception when a function that requires an argument is
called without any --- even if the argument isn't actually used...
Actually, you may have guessed the answer: the special thing about methods is
-that the object is passed as the first argument of the function. In our
+that the instance object is passed as the first argument of the function. In our
example, the call ``x.f()`` is exactly equivalent to ``MyClass.f(x)``. In
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 object before the first argument.
+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 an instance attribute is referenced that isn't a
@@ -906,4 +906,3 @@ Examples::
namespace; the name :attr:`~object.__dict__` is an attribute but not a global name.
Obviously, using this violates the abstraction of namespace implementation, and
should be restricted to things like post-mortem debuggers.
-