Commit 9329846f authored by Brett Cannon's avatar Brett Cannon

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.
parent 41a4f463
...@@ -1983,7 +1983,7 @@ left undefined. ...@@ -1983,7 +1983,7 @@ left undefined.
These methods are called to implement the binary arithmetic operations (``+``, These methods are called to implement the binary arithmetic operations (``+``,
``-``, ``*``, ``//``, ``%``, :func:`divmod`, :func:`pow`, ``**``, ``<<``, ``-``, ``*``, ``//``, ``%``, :func:`divmod`, :func:`pow`, ``**``, ``<<``,
``>>``, ``&``, ``^``, ``|``). For instance, to evaluate the expression ``>>``, ``&``, ``^``, ``|``). 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 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 equivalent to using :meth:`__floordiv__` and :meth:`__mod__`; it should not be
related to :meth:`__truediv__` (described below). Note that :meth:`__pow__` related to :meth:`__truediv__` (described below). Note that :meth:`__pow__`
...@@ -2028,7 +2028,7 @@ left undefined. ...@@ -2028,7 +2028,7 @@ left undefined.
``&``, ``^``, ``|``) with reflected (swapped) operands. These functions are ``&``, ``^``, ``|``) with reflected (swapped) operands. These functions are
only called if the left operand does not support the corresponding operation and only called if the left operand does not support the corresponding operation and
the operands are of different types. [#]_ For instance, to evaluate the 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 :meth:`__rsub__` method, ``y.__rsub__(x)`` is called if ``x.__sub__(y)`` returns
*NotImplemented*. *NotImplemented*.
...@@ -2065,10 +2065,10 @@ left undefined. ...@@ -2065,10 +2065,10 @@ left undefined.
in-place (modifying *self*) and return the result (which could be, but does 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 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 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 :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)`` 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) .. method:: object.__neg__(self)
...@@ -2206,12 +2206,12 @@ will not be supported. ...@@ -2206,12 +2206,12 @@ will not be supported.
* *
In *x*``+``*y*, if *x* is a sequence that implements sequence concatenation, In ``x + y``, if *x* is a sequence that implements sequence concatenation,
sequence concatenation is invoked. sequence concatenation is invoked.
* *
In *x*``*``*y*, if one operator is a sequence that implements sequence In ``x * y``, if one operator is a sequence that implements sequence
repetition, and the other is an integer (:class:`int` or :class:`long`), repetition, and the other is an integer (:class:`int` or :class:`long`),
sequence repetition is invoked. sequence repetition is invoked.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment