class TupleType(ProperType): (source)
The tuple type Tuple[T1, ..., Tn] (at least one type argument). Instance variables: items: Tuple item types partial_fallback: The (imprecise) underlying instance type that is used for non-tuple methods. This is generally builtins.tuple[Any, ...] for regular tuples, but it's different for named tuples and classes with a tuple base class. Use mypy.typeops.tuple_fallback to calculate the precise fallback type derived from item types. implicit: If True, derived from a tuple expression (t,....) instead of Tuple[t, ...]
Class Method | deserialize |
Undocumented |
Method | __eq__ |
Undocumented |
Method | __hash__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | accept |
Undocumented |
Method | can |
Undocumented |
Method | can |
Undocumented |
Method | can |
Undocumented |
Method | copy |
Undocumented |
Method | length |
Undocumented |
Method | serialize |
Undocumented |
Method | slice |
Undocumented |
Class Variable | __slots__ |
Undocumented |
Instance Variable | implicit |
Undocumented |
Instance Variable | items |
Undocumented |
Instance Variable | partial |
Undocumented |
Inherited from Type
(via ProperType
):
Method | __repr__ |
Undocumented |
Method | can |
Undocumented |
Method | can |
Undocumented |
Method | is |
Undocumented |
Property | can |
Undocumented |
Property | can |
Undocumented |
Instance Variable | _can |
Undocumented |
Instance Variable | _can |
Undocumented |
Inherited from Context
(via ProperType
, Type
):
Method | set |
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 |
Undocumented |
Instance Variable | end |
Undocumented |
Instance Variable | line |
Undocumented |
list[ Type]
, fallback: Instance
, line: int
= -1, column: int
= -1, implicit: bool
= False):
(source)
¶
mypy.types.Type.__init__
Undocumented
Instance|None
= None, items: list[ Type]|None
= None) -> TupleType
:
(source)
¶
Undocumented