API reference
python:astx:astx.flows.CaseStmt.__init__
method __init__
__init__(body: Block, condition: Optional[Expr] = None, default: bool = False, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None) -> None
Source: packages/astx/src/astx/flows.py:928
Initialize the CaseStmt instance.
Parameters
-
body — Statements forming the body.; Type: Block
-
condition — Condition controlling the operation.; Type: Optional[Expr]
-
default — Default used when no value is supplied.; Type: bool
-
loc — Source coordinates associated with the node.; Type: SourceLocation
-
parent — Parent node or enclosing scope.; Type: Optional[ASTNodes]
Returns
Type: None