API reference
python:astx:astx.context_manager.WithStmt
class WithStmt
WithStmt(items: list[WithItem], body: Block, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Source: packages/astx/src/astx/context_manager.py:100
AST class for the with statement (context manager).
Attributes
-
items — Type: list[WithItem]
-
body — Type: Block
-
kind — Type: ASTKind
Methods
-
__init__ — Initialize WithStmt instance.
-
__str__ — Return string representation of the WithStmt.
-
get_struct — Get structural representation of the WithStmt.