@@ -2023,11 +2023,13 @@ left undefined.
20232023 ``&= ``, ``^= ``, ``|= ``). These methods should attempt to do the operation
20242024 in-place (modifying *self *) and return the result (which could be, but does
20252025 not have to be, *self *). If a specific method is not defined, the augmented
2026- assignment falls back to the normal methods. For instance, to execute the
2027- statement ``x += y ``, where *x * is an instance of a class that has an
2028- :meth: `__iadd__ ` method, ``x.__iadd__(y) `` is called. If *x * is an instance
2029- of a class that does not define a :meth: `__iadd__ ` method, ``x.__add__(y) ``
2030- and ``y.__radd__(x) `` are considered, as with the evaluation of ``x + y ``.
2026+ assignment falls back to the normal methods. For instance, if *x * is an
2027+ instance of a class with an :meth: `__iadd__ ` method, ``x += y `` is equivalent
2028+ to ``x = x.__iadd__(y) `` . Otherwise, ``x.__add__(y) `` and ``y.__radd__(x) ``
2029+ are considered, as with the evaluation of ``x + y ``. In certain situations,
2030+ augmented assignment can result in unexpected errors (see
2031+ :ref: `faq-augmented-assignment-tuple-error `), but this behavior is in
2032+ fact part of the data model.
20312033
20322034
20332035.. method :: object.__neg__(self)
0 commit comments