Macaulay2 » Documentation
Packages » Python » PythonObject » PythonObject | PythonObject
next | previous | forward | backward | up | index | toc

# PythonObject | PythonObject -- bitwise disjunction of Python objects

- Operator: |
- Usage:
    `x | y`
- Inputs:
  - x, a python object,
  - y, a python object,
- Outputs:
  - a python object, bitwise disjunction of x and y;

## Description

Perform the bitwise disjunction ("or") operation on Python objects.

    i1 : toPython 6 or toPython 3

    o1 = 6

    o1 : PythonObject of class int

If one of the arguments is a Macaulay2 object, then it is first converted to a Python object.

    i2 : toPython 14 | 7

    o2 = 15

    o2 : PythonObject of class int

    i3 : 14 | toPython 7

    o3 = 15

    o3 : PythonObject of class int

## See also

- PythonObject & PythonObject -- bitwise conjunction of Python objects
- PythonObject ^^ PythonObject -- bitwise exclusive disjunction of Python objects
- PythonObject ~ -- bitwise negation of a python object
- PythonObject or PythonObject -- logical disjunction of Python objects
- PythonObject |= Thing -- augmented bitwise disjunction of Python objects

### Menu

- PythonObject |= Thing -- augmented bitwise disjunction of Python objects

## Ways to use this method:

- PythonObject | PythonObject -- bitwise disjunction of Python objects
- `PythonObject | Thing`
- `Thing | PythonObject`

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Python/doc/bitwise.m2:330:0.