Skip to content

Operator

Operator

Bases: Expression

Expression that represents a non-terminal node in the expression tree as a binary operator (i.e., and or or) on two Expression nodes.

related

Attributes

left instance-attribute

left = left

name instance-attribute

name = name

right instance-attribute

right = right

Functions

__init__

__init__(name: str = '', right: Expression | None = None, left: Expression | None = None) -> None

Constructor.

Parameters:

Name Type Description Default
name str

name of the operator

''
left Expression | None

left expression in the binary tree

None
right Expression | None

right expression in the binary tree.

None

__str__

__str__() -> str

Return the name of the operator.

Returns:

Type Description
str

name of the operator.