diff options
author | Brett Cannon <bcannon@gmail.com> | 2008-08-14 05:59:39 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2008-08-14 05:59:39 (GMT) |
commit | 3a954da1a7fccff4c8305420e57e51267b002bea (patch) | |
tree | f1bdd9427524b2ed89fe83596d5e387721d83276 /Doc/reference | |
parent | b6b8ebb610a9a47c9cf7ae230b99b929f02a5d6c (diff) | |
download | cpython-3a954da1a7fccff4c8305420e57e51267b002bea.zip cpython-3a954da1a7fccff4c8305420e57e51267b002bea.tar.gz cpython-3a954da1a7fccff4c8305420e57e51267b002bea.tar.bz2 |
Merged revisions 65668 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r65668 | brett.cannon | 2008-08-13 22:55:18 -0700 (Wed, 13 Aug 2008) | 4 lines
Fix markup for various binary operation examples where the operands were bolded
and the operator was made literal, leading to non-valid reST. Changed to have
the entire expression just be a literal bit of text.
........
Diffstat (limited to 'Doc/reference')
-rw-r--r-- | Doc/reference/datamodel.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 8f95700..04e6250 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -1710,7 +1710,7 @@ left undefined. These methods are called to implement the binary arithmetic operations (``+``, ``-``, ``*``, ``//``, ``%``, :func:`divmod`, :func:`pow`, ``**``, ``<<``, ``>>``, ``&``, ``^``, ``|``). For instance, to evaluate the expression - *x*``+``*y*, where *x* is an instance of a class that has an :meth:`__add__` + ``x + y``, where *x* is an instance of a class that has an :meth:`__add__` method, ``x.__add__(y)`` is called. The :meth:`__divmod__` method should be the equivalent to using :meth:`__floordiv__` and :meth:`__mod__`; it should not be related to :meth:`__truediv__` (described below). Note that :meth:`__pow__` @@ -1755,7 +1755,7 @@ left undefined. ``&``, ``^``, ``|``) with reflected (swapped) operands. These functions are only called if the left operand does not support the corresponding operation and the operands are of different types. [#]_ For instance, to evaluate the - expression *x*``-``*y*, where *y* is an instance of a class that has an + expression ``x - y``, where *y* is an instance of a class that has an :meth:`__rsub__` method, ``y.__rsub__(x)`` is called if ``x.__sub__(y)`` returns *NotImplemented*. @@ -1792,10 +1792,10 @@ left undefined. 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 + expression ``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*. + and ``y.__radd__(x)`` are considered, as with the evaluation of ``x + y``. .. method:: object.__neg__(self) |