[Python-checkins] r68727 - python/trunk/Doc/reference/datamodel.rst

georg.brandl python-checkins at python.org
Sun Jan 18 19:25:31 CET 2009


Author: georg.brandl
Date: Sun Jan 18 19:25:30 2009
New Revision: 68727

Log:
#4986: augassigns are not expressions.

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

Modified: python/trunk/Doc/reference/datamodel.rst
==============================================================================
--- python/trunk/Doc/reference/datamodel.rst	(original)
+++ python/trunk/Doc/reference/datamodel.rst	Sun Jan 18 19:25:30 2009
@@ -2084,13 +2084,13 @@
             object.__ixor__(self, other)
             object.__ior__(self, other)
 
-   These methods are called to implement the augmented arithmetic operations
+   These methods are called to implement the augmented arithmetic assignments
    (``+=``, ``-=``, ``*=``, ``/=``, ``//=``, ``%=``, ``**=``, ``<<=``, ``>>=``,
    ``&=``, ``^=``, ``|=``).  These methods should attempt to do the operation
    in-place (modifying *self*) and return the result (which could be, but does
    not have to be, *self*).  If a specific method is not defined, the augmented
-   operation falls back to the normal methods.  For instance, to evaluate the
-   expression ``x += y``, where *x* is an instance of a class that has an
+   assignment falls back to the normal methods.  For instance, to execute the
+   statement ``x += y``, where *x* is an instance of a class that has an
    :meth:`__iadd__` method, ``x.__iadd__(y)`` is called.  If *x* is an instance
    of a class that does not define a :meth:`__iadd__` method, ``x.__add__(y)``
    and ``y.__radd__(x)`` are considered, as with the evaluation of ``x + y``.


More information about the Python-checkins mailing list