
Dec. 6, 2021
6:49 p.m.
I’m a little curious about the comment that someone found no use case for ‘arbitrary literals of certain type’, such as Literal[int], in Tensor code. PEP 646 envisions generic arrays/tensors with shape typing, including using literal integers to indicate length of each dimension. Wouldn’t it be useful to bound the TypeVarTuple to constrain each dimension to be SOME literal int if that’s the intended use?