On Sat, Jan 16, 2021 at 8:39 PM David Foster <davidfstr@gmail.com> wrote:
On 1/12/21 1:00 PM, Matthew Rahtz via Typing-sig wrote:
> Guido had a really interesting suggestion in the last tensor typing
> meeting: what if, instead of creating a new constructor `TypeVarTuple`,
> we just did `TypeVar(bound=Tuple)`?

If I understand correctly the assertion is that:
        TypeVarTuple
is effectively the same as:
        TypeVar(bound=Tuple[Type, ...])
which is a bit more specific than:
        TypeVar(bound=Tuple)
(which is the phrasing you used).

I don't think that's correct though. The bound is not a tuple of types -- since that would imply that the values described by the typevar would themselves be types. Even without generics, we can write things like
```
A = Tuple[int, int]
B = Tuple[str, str, str]
```
If we generalize this to tuples of any length and any type we get `Tuple[object, ...]`, or perhaps `Tuple[Any, ...]`, but definitely not `Tuple[Type, ...]`.

Usually `Type` is only needed when we are manipulating class objects.

--
--Guido van Rossum (python.org/~guido)