Operator Functions

operator.or_()

Compute bitwise OR or set union (and other supported | operations), not short-circuit or. Equivalent to a | b; custom operand types control the result.

Formal Syntax & Structure

python syntaxpython
operator.or_(a, b, /)

Parameters & Attributes

NameTypeDescription
aobjectLeft operand or target object.
bobjectRight operand.

Return Value

object

The object result described above.

Working Example

Example Snippetpython
import operatorprint(operator.or_(6, 3))
Python Reference