API reference
python:astx:astx.WalrusOp
class WalrusOp
WalrusOp(lhs: Variable, rhs: DataType, loc: SourceLocation = NO_SOURCE_LOCATION)
Source: packages/astx/src/astx/operators.py:29
Declared as: python:astx:astx.operators.WalrusOp
AST class for the Walrus (assignment expression) operator.
Attributes
-
lhs — Left operand.; Type: Variable
-
rhs — Right operand.; Type: DataType
-
kind — Kind of value or operation.; Type: ASTKind
-
loc — Type: SourceLocation
-
comment — Type: str
-
parent — Type: Optional[ASTNodes]
-
ref — Type: str
-
nbytes — Type: int
-
type_ — Type: ExprType
-
name — Type: str
-
_tmp_id — Type: int
Methods
-
__init__ — Initialize the WalrusOp instance.
-
__str__ — Return a string that represents the object.
-
get_struct — Return the AST structure that represents the object.