Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Doc/library/operator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The operator functions without double underscores are preferred for clarity.
The one with underscores are only kept for back-compatibility.