class TypeVarExpr(TypeVarLikeExpr): (source)
Type variable expression TypeVar(...).
This is also used to represent type variables in symbol tables.
A type variable is not valid as a type unless bound in a TypeVarLikeScope. That happens within:
- a generic class that uses the type variable as a type argument or
- a generic function that refers to the type variable in its signature.
| Class Method | deserialize |
Undocumented |
| Method | __init__ |
Undocumented |
| Method | accept |
Undocumented |
| Method | serialize |
Undocumented |
| Class Variable | __slots__ |
Undocumented |
| Instance Variable | values |
Undocumented |
Inherited from TypeVarLikeExpr:
| Instance Variable | upper_bound |
Undocumented |
| Instance Variable | variance |
Undocumented |
| Property | fullname |
Undocumented |
| Property | name |
Undocumented |
| Instance Variable | _fullname |
Undocumented |
| Instance Variable | _name |
Undocumented |
Inherited from Node (via TypeVarLikeExpr, SymbolNode):
| Method | __str__ |
Undocumented |
Inherited from Context (via TypeVarLikeExpr, SymbolNode, Node):
| Method | get_column |
Don't use. Use x.column. |
| Method | get_line |
Don't use. Use x.line. |
| Method | set_line |
If target is a node, pull line (and column) information into this node. If column is specified, this will override any column information coming from a node. |
| Instance Variable | column |
Undocumented |
| Instance Variable | end_line |
Undocumented |
| Instance Variable | line |
Undocumented |
Inherited from Node (via TypeVarLikeExpr, Expression):
| Method | __str__ |
Undocumented |
Inherited from Context (via TypeVarLikeExpr, Expression, Node):
| Method | get_column |
Don't use. Use x.column. |
| Method | get_line |
Don't use. Use x.line. |
| Method | set_line |
If target is a node, pull line (and column) information into this node. If column is specified, this will override any column information coming from a node. |
| Instance Variable | column |
Undocumented |
| Instance Variable | end_line |
Undocumented |
| Instance Variable | line |
Undocumented |
mypy.nodes.SymbolNode.deserializeUndocumented
| Parameters | |
data:JsonDict | Undocumented |
| Returns | |
TypeVarExpr | Undocumented |
mypy.nodes.TypeVarLikeExpr.__init__Undocumented
| Parameters | |
name:str | Undocumented |
fullname:str | Undocumented |
values:List[ | Undocumented |
upper_bound:mypy.types.Type | Undocumented |
variance:int | Undocumented |
mypy.nodes.Node.acceptUndocumented
| Parameters | |
visitor:ExpressionVisitor[ | Undocumented |
| Returns | |
T | Undocumented |