astx.operators
astx.operators
Source: packages/astx/src/astx/operators.py
title: ASTx classes for the operators.Classes
WalrusOp(DataType)
title: AST class for the Walrus (assignment expression) operator.
attributes:
lhs:
type: Variable
rhs:
type: DataType
kind:
type: ASTKindMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure that represents the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructAssignmentExpr(Expr)
title: AST class for assignment expressions.
attributes:
kind:
type: ASTKind
targets:
type: ASTNodes[Expr]
value:
type: ExprMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructVariableAssignment(StatementType)
title: AST class for variable declaration.
attributes:
loc:
type: SourceLocation
kind:
type: ASTKind
name:
type: str
value:
type: ExprMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructAugAssign(DataType)
title: AST class for augmented assignment.
attributes:
kind:
type: ASTKind
target:
type: Identifier
op_code:
type: OpCodeAugAssign
value:
type: DataTypeMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructCompareOp(DataType)
title: AST class for comparison operators acting as properties.
attributes:
ops:
type: list[Literal[==, !=, <, >, <=, >=]]
comparators:
type: list[DataType]
left:
type: DataType
kind:
type: ASTKindMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure that represents the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructStarred(Expr)
title: AST class for starred expressions (*expr).
attributes:
kind:
type: ASTKind
value:
type: ExprMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure that represents the object.
parameters:
simplified:
type: bool
returns:
type: ReprStruct