On this page
operator.is_not
Prev: operator.is_none | Up: operator | Next: operator.is_not_none
Rel: operator.abs, operator.add, operator.and_, operator.attrgetter
Ref: docs.python.org — operator.is_not
Tags: #public #python3 #stdlib #operator
Import
import operator
from operator import is_not
Signature & Overview
operator.is_not(a, b, /)
Same as a is not b.
Usage
import operator
assert operator.is_not(1, None) is True
Gotchas
- Equivalent to
a is not b.
REPL Inspect
from operator import is_not
help(is_not)
Linked from
Related notes
- tuts/python3/stdlib_module/operator/is_none Linked here; links to this page; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/is_not_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