astx.comprehensions
astx.comprehensions
Source: packages/astx/src/astx/comprehensions.py
title: AST comprehension classes and functions.Classes
ComprehensionClause(Expr)
title: AST node for generic comprehensions.
attributes:
kind:
type: ASTKind
target:
type: Expr
iterable:
type: Expr
conditions:
type: ASTNodes[Expr]
is_async:
type: boolMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructComprehension(Expr)
title: AST Comprehension class.
attributes:
generators:
type: ASTNodes[ComprehensionClause]Methods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructListComprehension(Comprehension)
title: ListComprehension class.
attributes:
generators:
type: ASTNodes[ComprehensionClause]
element:
type: ExprMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructSetComprehension(Comprehension)
title: AST node representing set comprehension expressions.
attributes:
generators:
type: ASTNodes[ComprehensionClause]
kind:
type: ASTKind
element:
type: ExprMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructGeneratorExpr(Comprehension)
title: AST class for generator expressions.
attributes:
generators:
type: ASTNodes[ComprehensionClause]
kind:
type: ASTKind
element:
type: ExprMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStruct