API reference
python:astx:astx.types.operators.BinaryOp.__init__
method __init__
__init__(op_code: str, lhs: DataType, rhs: DataType, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None, *, mode: NumericMode = NumericMode.CHECKED) -> None
Source: packages/astx/src/astx/types/operators.py:283
Initialize the BinaryOp instance.
Parameters
-
op_code — Operator spelling.; Type: str
-
lhs — Left operand.; Type: DataType
-
rhs — Right operand.; Type: DataType
-
loc — Source coordinates associated with the node.; Type: SourceLocation
-
parent — Parent node or enclosing scope.; Type: Optional[ASTNodes]
-
mode — Selected processing mode.; Type: NumericMode
Returns
Type: None