summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-12-05 15:29:39 (GMT)
committerGeorg Brandl <georg@python.org>2008-12-05 15:29:39 (GMT)
commit9a053731458db4f8e4dad6e7f59a56c2ec58ac39 (patch)
tree47f65edc9bc6b5ab686e0f7f2e24b14e16d50587 /Doc
parentfe879e8a23e61c97aa461d65d0ac495a8a5f4692 (diff)
downloadcpython-9a053731458db4f8e4dad6e7f59a56c2ec58ac39.zip
cpython-9a053731458db4f8e4dad6e7f59a56c2ec58ac39.tar.gz
cpython-9a053731458db4f8e4dad6e7f59a56c2ec58ac39.tar.bz2
#4517: add "special method" glossary entry and clarify when __getattribute__ is bypassed.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/glossary.rst6
-rw-r--r--Doc/reference/datamodel.rst2
2 files changed, 7 insertions, 1 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index 7a87dd5..f3d86c3 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -498,6 +498,12 @@ Glossary
(subscript) notation uses :class:`slice` objects internally (or in older
versions, :meth:`__getslice__` and :meth:`__setslice__`).
+ special method
+ A method that is called implicitly by Python to execute a certain
+ operation on a type, such as addition. Such methods have names starting
+ and ending with double underscores. Special methods are documented in
+ :ref:`specialnames`.
+
statement
A statement is part of a suite (a "block" of code). A statement is either
an :term:`expression` or a one of several constructs with a keyword, such
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 4dcc96f..068f0fd 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -2370,7 +2370,7 @@ the instance when looking up special methods::
True
In addition to bypassing any instance attributes in the interest of
-correctness, implicit special method lookup may also bypass the
+correctness, implicit special method lookup generally also bypasses the
:meth:`__getattribute__` method even of the object's metaclass::
>>> class Meta(type):