astx.iterables
astx.iterables
Source: packages/astx/src/astx/iterables.py
title: ASTx iterable AST nodes.
summary: >-
Provide small facade nodes for iterable constructs that are not yet present
in upstream ASTx but are needed by semantic analysis and lowering.Classes
ForInLoopStmt(astx.StatementType)
title: Internal for-in statement node.
summary: >-
Model source forms equivalent to ``for target in iterable: body`` while
preserving ASTx-compatible target, iterable, and body child nodes.
attributes:
target:
type: astx.AST
iterable:
type: astx.AST
body:
type: astx.BlockMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the structured representation.
parameters:
simplified:
type: bool
returns:
type: ReprStructDictComprehension(astx.Comprehension)
title: Internal dictionary comprehension node.
summary: >-
Represent ``{key: value for ...}`` until upstream ASTx exposes a
canonical dictionary-comprehension expression node.
attributes:
key:
type: astx.Expr
value:
type: astx.ExprMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the structured representation.
parameters:
simplified:
type: bool
returns:
type: ReprStruct