Thanks for looking into this, Luk! I also think the hybrid sounds like a great approach.

Guido, would the right thing to do here be to mostly omit talk of Tuple[*Ts] from this PEP, only noting that it was considered, and draft a second PEP for the new syntax? Or should we roll it all into this PEP and say that the new syntax will only be available for future Python?

I'll also take a look at the draft for PEP 637 in the next couple of days to think more about how this would interact.

On Thu, 15 Oct 2020 at 05:58, Guido van Rossum <guido@python.org> wrote:
On Wed, Oct 14, 2020 at 12:52 PM <luk-f-a@outlook.com> wrote:
thanks Guido! I knew about PEP 637 but had not realized that it would make `*args` available in indexing.

@all: So PEP 637 might make this available, but the point about syntax changes making tensor typing unavailable to existing Python versions still remains. Which means that even if we agreed `Tuple[*Ts]` is better (and not everyone might agree), we face the choice of nicer syntax vs something immediately available.

I wonder what folks think about a hybrid approach with a `Expand` or `Map`/`Concatenate` operator-based solution for Python <= 3.9, plus unpack/splat approach for >= 3.10.

That sounds like a decent approach. Just like we're using typing.Union[X, Y] but in Python 3.10 you can also use X|Y, due to PEP 604.

--
--Guido van Rossum (python.org/~guido)
_______________________________________________
Typing-sig mailing list -- typing-sig@python.org
To unsubscribe send an email to typing-sig-leave@python.org
https://mail.python.org/mailman3/lists/typing-sig.python.org/
Member address: mrahtz@google.com