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