API reference
python:astx:astx.iterables.ForInLoopStmt
class ForInLoopStmt
ForInLoopStmt(target: astx.AST, iterable: astx.AST, body: astx.Block, loc: SourceLocation = NO_SOURCE_LOCATION, parent: astx.ASTNodes | None = None)
Source: packages/astx/src/astx/iterables.py:19
Internal for-in statement node.
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.Block
Methods
-
__init__ — Initialize one for-in statement.
-
__str__ — Return a compact display string.
-
get_struct — Return the structured representation.