API reference
python:astx:astx.SwitchStmt.__init__
method __init__
__init__(value: Expr, cases: list[CaseStmt] | ASTNodes[CaseStmt], loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None) -> None
Source: packages/astx/src/astx/flows.py:1019
Declared as: python:astx:astx.flows.SwitchStmt.__init__
Initialize the SwitchStmt instance.
Parameters
-
value — Value to process.; Type: Expr
-
cases — Cases.; Type: list[CaseStmt] | ASTNodes[CaseStmt]
-
loc — Source coordinates associated with the node.; Type: SourceLocation
-
parent — Parent node or enclosing scope.; Type: Optional[ASTNodes]
Returns
Type: None