API reference
python:astx:astx.CompareOp
class CompareOp
CompareOp(left: DataType, ops: Iterable[Literal['==', '!=', '<', '>', '<=', '>=']], comparators: Iterable[DataType], loc: SourceLocation = NO_SOURCE_LOCATION)
Source: packages/astx/src/astx/operators.py:330
Declared as: python:astx:astx.operators.CompareOp
AST class for comparison operators acting as properties.
Attributes
-
ops — Type: list[Literal[==, !=, <, >, <=, >=]]
-
comparators — Type: list[DataType]
-
left — Type: DataType
-
kind — Type: ASTKind
Methods
-
__init__ — Initialize the CompareOp instance.
-
__str__ — Return a string that represents the object.
-
get_struct — Return the AST structure that represents the object.