On this page
operator.is_none
Prev: operator.is_ | Up: operator | Next: operator.is_not
Rel: operator.abs, operator.add, operator.and_, operator.attrgetter
Ref: docs.python.org — operator.is_none
Tags: #public #python3 #stdlib #operator
Import
import operator
from operator import is_none
Signature & Overview
operator.is_none(a, /)
Same as a is None.
Usage
import operator
# Python 3.14+: functional form of `a is None`
if hasattr(operator, "is_none"):
assert operator.is_none(None) is True and operator.is_none(0) is False
Gotchas
- Requires Python 3.14+.
REPL Inspect
from operator import is_none
help(is_none)
Linked from
Related notes
- tuts/python3/stdlib_module/operator/is_ Linked here; links to this page; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/is_not 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