diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2015-09-06 21:44:45 +0300 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2015-09-06 21:44:45 +0300 |
commit | f352202977fc53197bd38198b1ac26ed4008a9ba (patch) | |
tree | 34246df426e6f7d82794886be98c613903a5655e /Doc/library/operator.rst | |
parent | d68070857ae58758849446f5ae162ff3bffb7d6e (diff) | |
parent | 2936930f6c8fc1d8992b680181c30f417d74b7c2 (diff) | |
download | cpython-f352202977fc53197bd38198b1ac26ed4008a9ba.tar.gz |
#23144: merge with 3.4.
Diffstat (limited to 'Doc/library/operator.rst')
-rw-r--r-- | Doc/library/operator.rst | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Doc/library/operator.rst b/Doc/library/operator.rst index f9e2a3d003..c01e63b77a 100644 --- a/Doc/library/operator.rst +++ b/Doc/library/operator.rst @@ -138,6 +138,14 @@ The mathematical and bitwise operations are the most numerous: Return ``a * b``, for *a* and *b* numbers. +.. function:: matmul(a, b) + __matmul__(a, b) + + Return ``a @ b``. + + .. versionadded:: 3.5 + + .. function:: neg(obj) __neg__(obj) @@ -391,6 +399,8 @@ Python syntax and the functions in the :mod:`operator` module. +-----------------------+-------------------------+---------------------------------------+ | Multiplication | ``a * b`` | ``mul(a, b)`` | +-----------------------+-------------------------+---------------------------------------+ +| Matrix Multiplication | ``a @ b`` | ``matmul(a, b)`` | ++-----------------------+-------------------------+---------------------------------------+ | Negation (Arithmetic) | ``- a`` | ``neg(a)`` | +-----------------------+-------------------------+---------------------------------------+ | Negation (Logical) | ``not a`` | ``not_(a)`` | @@ -499,6 +509,14 @@ will perform the update, so no subsequent assignment is necessary: ``a = imul(a, b)`` is equivalent to ``a *= b``. +.. function:: imatmul(a, b) + __imatmul__(a, b) + + ``a = imatmul(a, b)`` is equivalent to ``a @= b``. + + .. versionadded:: 3.5 + + .. function:: ior(a, b) __ior__(a, b) |