API reference
python:astx:astx.exceptions.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:212
Initialize the instance.
Parameters
-
body — Statements forming the body.; Type: Block[AST]
-
handlers — Handlers.; Type: Iterable[CatchHandlerStmt] | ASTNodes[CatchHandlerStmt]
-
finally_handler — Finally handler.; Type: Optional[FinallyHandlerStmt]
-
parent — Parent node or enclosing scope.; Type: Optional[ASTNodes]
-
loc — Source coordinates associated with the node.; Type: SourceLocation
-
else_body — Else body.; Type: Optional[Block[AST]]
Returns
Type: None