API reference
python:astx:astx.AugAssign
class AugAssign
AugAssign(target: Identifier, op_code: OpCodeAugAssign, value: DataType, loc: SourceLocation = NO_SOURCE_LOCATION)
Source: packages/astx/src/astx/operators.py:227
Declared as: python:astx:astx.operators.AugAssign
AST class for augmented assignment.
Model a single identifier target and RHS value. The operation yields the stored value internally; frontends may restrict it to statement contexts. Operator modeling does not imply backend support. Numeric, mutability, conversion, and failure rules belong to semantic analysis and lowering.
Attributes
-
kind — Kind of value or operation.; Type: ASTKind
-
target — Destination of the operation.; Type: Identifier
-
op_code — Operator spelling.; Type: OpCodeAugAssign
-
value — Stored value.; Type: DataType
-
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 augmented assignment.
-
__str__ — Return a string that represents the augmented assignment object.
-
get_struct — Return the AST structure of the object.