API reference

python:astx:astx.DictComprehension

class DictComprehension

DictComprehension(key: astx.Expr, value: astx.Expr, generators: astx.ASTNodes[astx.ComprehensionClause] | Iterable[astx.ComprehensionClause] = (), loc: SourceLocation = NO_SOURCE_LOCATION, parent: astx.ASTNodes | None = None)

Source: packages/astx/src/astx/iterables.py:99

Declared as: python:astx:astx.iterables.DictComprehension

Internal dictionary comprehension node.

Represent {key: value for ...} until upstream ASTx exposes a canonical dictionary-comprehension expression node.

Attributes

Methods

Attributes

Search documentation

Type to search.