On this page
operator.is_
Prev: operator.irshift | Up: operator | Next: operator.is_none
Rel: operator.abs, operator.add, operator.and_, operator.attrgetter
Ref: docs.python.org — operator.is_
Tags: #public #python3 #stdlib #operator
Import
import operator
from operator import is_
Signature & Overview
operator.is_(a, b, /)
Same as a is b.
Usage
import operator
x = object()
assert operator.is_(x, x) is True
Gotchas
- Identity check (
a is b); trailing underscore avoids theiskeyword.
REPL Inspect
from operator import is_
help(is_)
Linked from
Related notes
- tuts/python3/stdlib_module/operator/irshift Linked here; links to this page; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/is_none 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