On this page
operator.isub
Prev: operator.is_not_none | Up: operator | Next: operator.itemgetter
Rel: operator.abs, operator.add, operator.and_, operator.attrgetter
Ref: docs.python.org — operator.isub
Tags: #public #python3 #stdlib #operator
Import
import operator
from operator import isub
Signature & Overview
operator.isub(a, b, /)
Same as a -= b.
Usage
import operator
s = {1, 2, 3}
assert operator.isub(s, {2}) is s and s == {1, 3}
Gotchas
- In-place
-=.
REPL Inspect
from operator import isub
help(isub)
Linked from
Related notes
- tuts/python3/stdlib_module/operator/is_not_none Linked here; links to this page; shared tags: #operator, #stdlib
- tuts/python3/stdlib_module/operator/itemgetter 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