API reference
python:astx:astx.context_manager.WithStmt.__init__
method __init__
__init__(items: list[WithItem], body: Block, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None) -> None
Source: packages/astx/src/astx/context_manager.py:102
Initialize WithStmt instance.
Parameters
-
items — Items to process.; Type: list[WithItem]
-
body — Statements forming the body.; Type: Block
-
loc — Source coordinates associated with the node.; Type: SourceLocation
-
parent — Parent node or enclosing scope.; Type: Optional[ASTNodes]
Returns
Type: None