Primary
operator ⚬⃕ᵖʸ|Documentation|1st|20251021001835-00-⌔
operator — Standard operators as functions — Python 3 documentation
operator— Standard operators as functionsSource code: Lib/operator.py
The
operatormodule exports a set of efficient functions corresponding to the intrinsic operators of Python. For example,operator.add(x, y)is equivalent to the expressionx+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 object comparison functions are useful for all objects, and are named after the rich comparison operators they support:
Printed 2026-06-28.
(echo:: @ ᯤ)
Link to original
Secondary
• • •