API reference
python:astx:astx.operators.WalrusOp
class WalrusOp
WalrusOp(lhs: Variable, rhs: DataType, loc: SourceLocation = NO_SOURCE_LOCATION)
Source: packages/astx/src/astx/operators.py:30
AST class for the Walrus (assignment expression) operator.
Attributes
-
lhs — Type: Variable
-
rhs — Type: DataType
-
kind — Type: ASTKind
Methods
-
__init__ — Initialize the WalrusOp instance.
-
__str__ — Return a string that represents the object.
-
get_struct — Return the AST structure that represents the object.