I don't believe this is supported in pep 646 today. It was originally going to 
be supported with a Map operator. With a Map operator it would let you do 
something like,

T = TypeVar('T')
Ts = TypeVarTuple("Ts")
IndexedTuple = Tuple[Int, T]

def enumerage_args(*args: *Ts) -> *Map[IndexedTuple, Ts]
  return enumerate(args)

Map operator takes two arguments, a generic type and type var tuple. This 
document describes map operator in more detail and an older version of the pep 
had it.

https://docs.google.com/document/d/1szTVcFyLznoDT7phtT-6Fpvp27XaBw9DmbTLHrB6BE4/edit

The reason it is missing is original version of 646 was becoming too complex 
for a single pep. My understanding is your example/similar examples are 
intended for the future to be supported, but that Map operator and other 
extensions to variadic generics will be future peps.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/YBJXIAGODKH4NB5OD4YBZUZPA7NV6T73/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to