diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2017-09-24 21:13:15 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2017-09-24 21:13:15 (GMT) |
commit | d38caf68bb417232fb0ccecb5558d7d0ca4a9507 (patch) | |
tree | 5141bf4acf8fae25ff92b62a64728137d186a034 /Doc/library | |
parent | 415cc1fa57710614ed3384d0cafc58ccf7adee8c (diff) | |
download | cpython-d38caf68bb417232fb0ccecb5558d7d0ca4a9507.zip cpython-d38caf68bb417232fb0ccecb5558d7d0ca4a9507.tar.gz cpython-d38caf68bb417232fb0ccecb5558d7d0ca4a9507.tar.bz2 |
[3.6] bpo-30085: Improve documentation for operator (GH-1171) (#3736)
The dunderless functions are preferred; dunder are retained for back compatilibity.
Patch by Sanket Dasgupta.
(cherry picked from commit 5b9299d8c72aeadccadd77e4b8132094ba9a1f96)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/operator.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/library/operator.rst b/Doc/library/operator.rst index 8121b48..60bf23a 100644 --- a/Doc/library/operator.rst +++ b/Doc/library/operator.rst @@ -17,9 +17,10 @@ The :mod:`operator` module exports a set of efficient functions corresponding to the intrinsic operators of Python. For example, ``operator.add(x, y)`` is -equivalent to the expression ``x+y``. The function names are those used for -special class methods; variants without leading and trailing ``__`` are also -provided for convenience. +equivalent to the expression ``x+y``. Many function names are those used for +special methods, without the double underscores. For backward compatibility, +many of these have a variant with the double underscores kept. The variants +without the double underscores are preferred for clarity. The functions fall into categories that perform object comparisons, logical operations, mathematical operations and sequence operations. |