API reference
python:astx:astx.DictComprehension.__init__
method __init__
__init__(key: astx.Expr, value: astx.Expr, generators: astx.ASTNodes[astx.ComprehensionClause] | Iterable[astx.ComprehensionClause] = (), loc: SourceLocation = NO_SOURCE_LOCATION, parent: astx.ASTNodes | None = None) -> None
Source: packages/astx/src/astx/iterables.py:116
Declared as: python:astx:astx.iterables.DictComprehension.__init__
Initialize one dictionary comprehension.
Parameters
-
key — Type: astx.Expr
-
value — Type: astx.Expr
-
generators — Type: astx.ASTNodes[astx.ComprehensionClause] | Iterable[astx.ComprehensionClause]
-
loc — Type: SourceLocation
-
parent — Type: astx.ASTNodes | None