API reference
python:astx:astx.SubscriptExpr
class SubscriptExpr
SubscriptExpr(value: Expr, index: Optional[Expr] = None, lower: Optional[Expr] = None, upper: Optional[Expr] = None, step: Optional[Expr] = None, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Source: packages/astx/src/astx/subscript.py:24
Declared as: python:astx:astx.subscript.SubscriptExpr
AST class for subscript expressions.
Attributes
-
kind — Type: ASTKind
-
type_ — Type: DataType
-
value — Type: Expr
-
index — Type: Expr
-
lower — Type: Expr
-
upper — Type: Expr
-
step — Type: Expr
-
is_slice — Type: bool; Distinguish omitted slice bounds from an explicit none index.
Methods
-
__init__ — Initialize the SubscriptExpr instance.
-
__str__ — Return a string that represents the object.
-
_get_struct_wrapper — Return the AST structure of the object.
-
get_struct — Return the AST structure of the object.