API reference
python:astx:astx.operators.AssignmentExpr
class AssignmentExpr
AssignmentExpr(targets: Iterable[Expr] | ASTNodes[Expr], value: Expr, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Source: packages/astx/src/astx/operators.py:84
AST class for assignment expressions.
Attributes
-
kind — Kind of value or operation.; Type: ASTKind
-
targets — Targets.; Type: ASTNodes[Expr]
-
value — Stored value.; Type: Expr
-
loc — Type: SourceLocation
-
comment — Type: str
-
parent — Type: Optional[ASTNodes]
-
ref — Type: str
-
nbytes — Type: int
Methods
-
__init__ — Initialize the assignment expression.
-
__str__ — Return a string that represents the object.
-
get_struct — Return the AST structure of the object.