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

operator.ior

Prev: operator.invert | Up: operator | Next: operator.ipow
Rel: operator.abs, operator.add, operator.and_, operator.attrgetter
Ref: docs.python.org — operator.ior
Tags: #public #python3 #stdlib #operator


Import

import operator
from operator import ior

Signature & Overview

operator.ior(a, b, /)

Same as a |= b.

Usage

import operator

d = {"a": 1}
assert operator.ior(d, {"b": 2}) is d and d == {"a": 1, "b": 2}

Gotchas

REPL Inspect

from operator import ior
help(ior)

Linked from

Related notes