mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 19:40:18 +00:00
14 lines
441 B
Markdown
14 lines
441 B
Markdown
---
|
|
icon: package
|
|
label: operator
|
|
---
|
|
|
|
The 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`.
|
|
Many function names are those used for special methods, without the double underscores.
|
|
|
|
+ `operator.lt(a, b)`
|
|
+ `operator.le(a, b)`
|
|
+ `operator.eq(a, b)`
|
|
+ `operator.ne(a, b)`
|
|
+ `operator.ge(a, b)`
|
|
+ `operator.gt(a, b)` |