API reference
python:astx:astx.types.UnionType
class UnionType
UnionType(members: Iterable[astx.DataType], *, alias_name: str | None = None)
Source: packages/astx/src/astx/types/generic.py:17
Declared as: python:astx:astx.types.generic.UnionType
Finite compile-time union type domain.
Represent one union of concrete type references that semantic analysis may enumerate as a finite type domain.
Attributes
-
members — Members.; Type: tuple[astx.DataType, ...]
-
alias_name — Name of alias.; Type: str | None
-
loc — Type: SourceLocation
-
kind — Type: ASTKind
-
comment — Type: str
-
parent — Type: Optional[ASTNodes]
-
ref — Type: str
-
nbytes — Type: int
-
type_ — Type: ExprType
-
name — Type: str
-
_tmp_id — Type: int
Methods
-
__init__ — Initialize one finite union type.
-
__str__ — Render one finite union type as text.
-
get_struct — Build one repr structure for a finite union type.
Attributes
-
members —