What would this evaluate to at runtime? tuple.__getitem__(<generator>)?

 

AbyxDev;

https://abyx.dev

 

From: jakob.leben@gmail.com
Sent: Tuesday, October 4, 2022 11:25 AM
To:
typing-sig@python.org
Subject: [Typing-sig] Re: Dependent mapping of TypeVarTuples?

 

Has someone considered the following intuitive syntax using 'for ... in ...' instead of the Map operator? In my opinion, it's a bit more verbose, but also much more intuitive as well as powerful at the same time.

 

Ts = TypeVarTuple('Ts')

def pair_with_ids(*args: *Ts) -> tuple[tuple[int, T] for T in Ts]: ...

_______________________________________________

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: ken@abyx.dev