API reference
python:astx:astx.comprehensions.GeneratorExpr.__init__
method __init__
__init__(element: Expr, generators: Iterable[ComprehensionClause] | ASTNodes[ComprehensionClause], loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None) -> None
Source: packages/astx/src/astx/comprehensions.py:292
Initialize the GeneratorExpr instance.
Parameters
-
element — Element.; Type: Expr
-
generators — Generators.; Type: Iterable[ComprehensionClause] | ASTNodes[ComprehensionClause]
-
loc — Source coordinates associated with the node.; Type: SourceLocation
-
parent — Parent node or enclosing scope.; Type: Optional[ASTNodes]
Returns
Type: None