Kaydet (Commit) 5b9299d8 authored tarafından Sanket Dasgupta's avatar Sanket Dasgupta Kaydeden (comit) Terry Jan Reedy

bpo-30085: Improve documentation for operator (#1171)

The dunderless functions are preferred; dunder are retained for back compatilibity.
Patch by Sanket Dasgupta.
üst 5d3e8002
......@@ -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.
......
The operator functions without double underscores are preferred for clarity.
The one with underscores are only kept for back-compatibility.
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