API reference
python:astx:astx.iterables.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:102
Initialize one dictionary comprehension.
Parameters
-
key — Key selecting the entry.; Type: astx.Expr
-
value — Value to process.; Type: astx.Expr
-
generators — Generators.; Type: astx.ASTNodes[astx.ComprehensionClause] | Iterable[astx.ComprehensionClause]
-
loc — Source coordinates associated with the node.; Type: SourceLocation
-
parent — Parent node or enclosing scope.; Type: astx.ASTNodes | None
Returns
Type: None