API reference
python:astx:astx.ExceptionHandlerStmt.__init__
method __init__
__init__(body: Block[AST], handlers: Iterable[CatchHandlerStmt] | ASTNodes[CatchHandlerStmt], finally_handler: Optional[FinallyHandlerStmt] = None, parent: Optional[ASTNodes] = None, loc: SourceLocation = NO_SOURCE_LOCATION, *, else_body: Optional[Block[AST]] = None) -> None
Source: packages/astx/src/astx/exceptions.py:241
Declared as: python:astx:astx.exceptions.ExceptionHandlerStmt.__init__
Initialize the instance.
Parameters
-
body — Type: Block[AST]
-
handlers — Type: Iterable[CatchHandlerStmt] | ASTNodes[CatchHandlerStmt]
-
finally_handler — Type: Optional[FinallyHandlerStmt]
-
parent — Type: Optional[ASTNodes]
-
loc — Type: SourceLocation
-
else_body — Type: Optional[Block[AST]]