API reference
python:astx:astx.comprehensions.SetComprehension
class SetComprehension
SetComprehension(element: Expr, generators: ASTNodes[ComprehensionClause] | Iterable[ComprehensionClause] = [], loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Source: packages/astx/src/astx/comprehensions.py:242
AST node representing set comprehension expressions.
Attributes
-
generators — Type: ASTNodes[ComprehensionClause]
-
kind — Type: ASTKind
-
element — Type: Expr
Methods
-
__init__ — Initialize the SetComprehension instance.
-
__str__ — Return a string representation of the object.
-
get_struct — Return the AST structure of the object.