Lines Matching refs:tuple
59 # Unpacked tuple using `*`
60 (*tuple[int],)[0],
61 (*tuple[T],)[0],
62 (*tuple[int, str],)[0],
63 (*tuple[int, ...],)[0],
64 (*tuple[T, ...],)[0],
65 tuple[*tuple[int, ...]],
66 tuple[*tuple[T, ...]],
67 tuple[str, *tuple[int, ...]],
68 tuple[*tuple[int, ...], str],
69 tuple[float, *tuple[int, ...], str],
70 tuple[*tuple[*tuple[int, ...]]],
71 # Unpacked tuple using `Unpack`
72 Unpack[tuple[int]],
73 Unpack[tuple[T]],
74 Unpack[tuple[int, str]],
75 Unpack[tuple[int, ...]],
76 Unpack[tuple[T, ...]],
77 tuple[Unpack[tuple[int, ...]]],
78 tuple[Unpack[tuple[T, ...]]],
79 tuple[str, Unpack[tuple[int, ...]]],
80 tuple[Unpack[tuple[int, ...]], str],
81 tuple[float, Unpack[tuple[int, ...]], str],
82 tuple[Unpack[tuple[Unpack[tuple[int, ...]]]]],
83 # Unpacked tuple using `*` AND `Unpack`
84 tuple[Unpack[tuple[*tuple[int, ...]]]],
85 tuple[*tuple[Unpack[tuple[int, ...]]]],
91 generic_types = [type, tuple, list, dict, set, frozenset, enumerate,
150 for t in tuple, list, dict, set, frozenset, defaultdict, deque:
205 self.assertEqual(repr(tuple[int, ...]), 'tuple[int, ...]')
206 x1 = tuple[*tuple[int]]
207 self.assertEqual(repr(x1), 'tuple[*tuple[int]]')
208 x2 = tuple[*tuple[int, str]]
209 self.assertEqual(repr(x2), 'tuple[*tuple[int, str]]')
210 x3 = tuple[*tuple[int, ...]]
211 self.assertEqual(repr(x3), 'tuple[*tuple[int, ...]]')
264 T1 = tuple[*tuple[int]]
267 (*tuple[int],),
271 T2 = tuple[*tuple[T]]
274 (*tuple[T],),
278 T4 = tuple[*tuple[int, str]]
281 (*tuple[int, str],),
318 self.assertEqual((*tuple[int],)[0], (*tuple[int],)[0])
319 self.assertEqual(tuple[*tuple[int]], tuple[*tuple[int]])
323 self.assertNotEqual(list[int], tuple[int])
324 self.assertNotEqual((*tuple[int],)[0], tuple[int])
387 alias = tuple[str, ...]
398 a = typing.Union[list[T], tuple[T, ...]]
399 self.assertEqual(a.__args__, (list[T], tuple[T, ...]))
434 t = tuple[int, str]
437 self.assertEqual(repr(x), '*tuple[int, str]')
440 t = tuple[int, str]
447 t = tuple[int, str]
453 _UNITERABLE_TYPES = (list, tuple)