API reference

python:astx:astx.SubscriptExpr.__init__

method __init__

__init__(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) -> None

Source: packages/astx/src/astx/subscript.py:60

Declared as: python:astx:astx.subscript.SubscriptExpr.__init__

Initialize the SubscriptExpr instance.

Parameters

value: Expr The expression representing the object being indexed (e.g., an array or list). index (optional): Expr The index of the variable. lower (optional): Expr The lower bound of the slice (inclusive). upper (optional): Expr The upper bound of the slice (exclusive). step (optional): Expr The step size for the slice. loc: SourceLocation The source location of the expression. parent (optional): ASTNodes The parent AST node.

Parameters

Search documentation

Type to search.