API reference
python:astx:astx.flows.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:1184
Initialize the SwitchStmt instance.
Parameters
-
value — Type: Expr
-
cases — Type: list[CaseStmt] | ASTNodes[CaseStmt]
-
loc — Type: SourceLocation
-
parent — Type: Optional[ASTNodes]