API reference
python:astx:astx.Comprehension
class Comprehension
Comprehension(generators: Iterable[ComprehensionClause] | ASTNodes[ComprehensionClause], loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Source: packages/astx/src/astx/comprehensions.py:110
Declared as: python:astx:astx.comprehensions.Comprehension
AST Comprehension class.
Attributes
-
generators — Generators.; Type: ASTNodes[ComprehensionClause]
-
loc — Type: SourceLocation
-
kind — Type: ASTKind
-
comment — Type: str
-
parent — Type: Optional[ASTNodes]
-
ref — Type: str
-
nbytes — Type: int
Methods
-
__init__ — Initialize the comprehension expression.
-
get_struct — Return the AST structure of the object.