API reference
python:astx:astx.flows.IfStmt.__init__
method __init__
__init__(condition: Expr, then: Block, else_: Optional[Block] = None, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None) -> None
Source: packages/astx/src/astx/flows.py:51
Initialize the IfStmt instance.
Parameters
-
condition — Type: Expr
-
then — Type: Block
-
else_ — Type: Optional[Block]
-
loc — Type: SourceLocation
-
parent — Type: Optional[ASTNodes]