API reference
python:astx:astx.SetExpr
class SetExpr
SetExpr(elements: Sequence[Expr], loc: SourceLocation = NO_SOURCE_LOCATION)
Source: packages/astx/src/astx/collections/sets.py:22
Declared as: python:astx:astx.collections.sets.SetExpr
Construct a set from expressions evaluated in source order.
Attributes
-
elements — Expressions contributing keys to the result.; Type: list[Expr]
-
type_ — Type associated with the expression before analysis.; Type: AnyType
-
loc — Type: SourceLocation
-
kind — Type: ASTKind
-
comment — Type: str
-
parent — Type: Optional[ASTNodes]
-
ref — Type: str
-
nbytes — Type: int
-
name — Type: str
-
_tmp_id — Type: int
Methods
-
__init__ — Preserve the expressions without inferring their key type.
-
get_struct — Return the ordered structured representation.