API reference
python:astx:astx.ComprehensionClause.__init__
method __init__
__init__(target: Expr, iterable: Expr, conditions: Optional[Iterable[Expr] | ASTNodes[Expr]] = None, is_async: bool = False, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None) -> None
Source: packages/astx/src/astx/comprehensions.py:46
Declared as: python:astx:astx.comprehensions.ComprehensionClause.__init__
Initialize the comprehension clause.
Parameters
-
target — Destination of the operation.; Type: Expr
-
iterable — Iterable.; Type: Expr
-
conditions — Conditions.; Type: Optional[Iterable[Expr] | ASTNodes[Expr]]
-
is_async — Whether is async.; Type: bool
-
loc — Source coordinates associated with the node.; Type: SourceLocation
-
parent — Parent node or enclosing scope.; Type: Optional[ASTNodes]
Returns
Type: None