[Python-Dev] Re: PEP-646 question: unpacking into single Generic parameter

2021-10-14 Thread Matthew Rahtz via Python-Dev
Oops, sorry for the slow reply - I'm not subscribed to this mailing list. As Mehdi2277 says, this would indeed require the Map operator we'll introduce in a future PEP. But that's a good point about the `*Tuple[int, Ts]` syntax. I think the interpretation of it that would be most consistent

[Python-Dev] Re: PEP-646 question: unpacking into single Generic parameter

2021-09-24 Thread Mehdi2277
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,