API reference
python:astx:astx.templates.TemplateTypeVar
class TemplateTypeVar
TemplateTypeVar(name: str, *, bound: astx.DataType)
Source: packages/astx/src/astx/types/generic.py:71
Declared as: python:astx:astx.types.generic.TemplateTypeVar
Semantic-only template type variable.
Represent one unresolved template type parameter inside function signatures or local declared types before specialization.
Attributes
-
name — Name identifying this declaration.; Type: str
-
bound — Names bound in the function scope.; Type: astx.DataType
-
loc — Type: SourceLocation
-
kind — Type: ASTKind
-
comment — Type: str
-
parent — Type: Optional[ASTNodes]
-
ref — Type: str
-
nbytes — Type: int
-
type_ — Type: ExprType
-
_tmp_id — Type: int
Methods
-
__init__ — Initialize one template type variable.
-
__str__ — Render one template type variable as text.
-
get_struct — Build one repr structure for a template type variable.