On this page
  1. operator.iadd
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

operator.iadd

Prev: operator.gt | Up: operator | Next: operator.iand
Rel: operator.abs, operator.add, operator.and_, operator.attrgetter
Ref: docs.python.org — operator.iadd
Tags: #public #python3 #stdlib #operator


Import

import operator
from operator import iadd

Signature & Overview

operator.iadd(a, b, /)

Same as a += b.

Usage

import operator

xs = [1, 2]
res = operator.iadd(xs, [3])
assert res is xs and xs == [1, 2, 3]

Gotchas

REPL Inspect

from operator import iadd
help(iadd)

Linked from

Related notes