[Python-checkins] r67579 - in python/trunk/Doc: glossary.rst reference/datamodel.rst

georg.brandl python-checkins at python.org
Fri Dec 5 16:29:39 CET 2008


Author: georg.brandl
Date: Fri Dec  5 16:29:39 2008
New Revision: 67579

Log:
#4517: add "special method" glossary entry and clarify when __getattribute__ is bypassed.


Modified:
   python/trunk/Doc/glossary.rst
   python/trunk/Doc/reference/datamodel.rst

Modified: python/trunk/Doc/glossary.rst
==============================================================================
--- python/trunk/Doc/glossary.rst	(original)
+++ python/trunk/Doc/glossary.rst	Fri Dec  5 16:29:39 2008
@@ -498,6 +498,12 @@
       (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

Modified: python/trunk/Doc/reference/datamodel.rst
==============================================================================
--- python/trunk/Doc/reference/datamodel.rst	(original)
+++ python/trunk/Doc/reference/datamodel.rst	Fri Dec  5 16:29:39 2008
@@ -2370,7 +2370,7 @@
    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):


More information about the Python-checkins mailing list