Author kj
Recipients BTaskaya, Zac Hatfield-Dodds, corona10, gvanrossum, kj, levkivskyi, serhiy.storchaka
Date 2020-11-23.05:59:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1606111184.84.0.332696830274.issue42195@roundup.psfhosted.org>
In-reply-to
Content
@guido,
Aesthetics-wise, I agree that ((int, int), str) looks by far the best. My gripe with it lies with the implementation - almost every function in typing currently assumes that every object in __args__ is a type, having (int, int) - the tuple object - requires many changes especially to TypeVar substitution and repr.

I thought that (tuple[int, int], str) looked fine because the positional arguments passed to a function can be represented by a single tuple (and also no need for imports in collections.abc :)! ). However, I support (int, int, str) too for the backwards-compatibility reasons you stated. The only downside to that is that Callable's __args__ will be slightly harder to parse if more args representing other things are added in the future.
History
Date User Action Args
2020-11-23 05:59:44kjsetrecipients: + kj, gvanrossum, serhiy.storchaka, levkivskyi, corona10, Zac Hatfield-Dodds, BTaskaya
2020-11-23 05:59:44kjsetmessageid: <1606111184.84.0.332696830274.issue42195@roundup.psfhosted.org>
2020-11-23 05:59:44kjlinkissue42195 messages
2020-11-23 05:59:44kjcreate