API reference
python:astx:astx.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
Declared as: python:astx:astx.iterables.ForInLoopStmt
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 — Destination of the operation.; Type: astx.AST
-
iterable — Iterable.; Type: astx.AST
-
body — Statements forming the body.; Type: astx.Block
-
loc — Type: SourceLocation
-
kind — Type: ASTKind
-
comment — Type: str
-
parent — Type: Optional[ASTNodes]
-
ref — Type: str
Methods
-
__init__ — Initialize one for-in statement.
-
__str__ — Return a compact display string.
-
get_struct — Return the structured representation.