API reference
python:astx:astx.GeneratorExpr
class GeneratorExpr
GeneratorExpr(element: Expr, generators: Iterable[ComprehensionClause] | ASTNodes[ComprehensionClause], loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Source: packages/astx/src/astx/comprehensions.py:315
Declared as: python:astx:astx.comprehensions.GeneratorExpr
AST class for generator expressions.
Attributes
-
generators — Type: ASTNodes[ComprehensionClause]
-
kind — Type: ASTKind
-
element — Type: Expr
Methods
-
__init__ — Initialize the GeneratorExpr instance.
-
get_struct — Return the AST structure of the object.