On this page
operator.eq
Prev: operator.delitem | Up: operator | Next: operator.floordiv
Rel: operator.abs, operator.add, operator.and_, operator.attrgetter
Ref: docs.python.org — operator.eq
Tags: #public #python3 #stdlib #operator
Import
import operator
from operator import eq
Signature & Overview
operator.eq(a, b, /)
Same as a == b.
Usage
import operator
assert operator.eq(3, 3.0) is True
Gotchas
- Equivalent to
a == b(useoperator.is_for identityis).
REPL Inspect
from operator import eq
help(eq)
Linked from
Related notes
- tuts/python3/stdlib_module/operator/delitem Linked here; links to this page; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/floordiv Linked here; links to this page; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/operator/abs Linked here; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/add Linked here; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/and_ Linked here; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/attrgetter Linked here; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/call shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/concat shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/contains shared tags: #operator, #stdlib