This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author matthew.rahtz
Recipients AlexWaygood, JelleZijlstra, gvanrossum, kj, matthew.rahtz, mrahtz, serhiy.storchaka
Date 2022-04-05.20:03:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1649188982.59.0.913314772969.issue47006@roundup.psfhosted.org>
In-reply-to
Content
Ok, https://github.com/python/cpython/pull/32341/files is a reference of how the current implementation behaves. Fwiw, it *is* mostly correct - with a few minor tweaks it might be alright for at least the 3.11 release.

In particular, instead of dealing with the thorny issue of what to do about splitting unpacked arbitrary-length tuples over multiple type variables - e.g. C[T, *Ts][*tuple[int, ...]] - instead either deciding to try and evaluate it properly and living with the complexity, or leaving it unsimplified and living with the __args__, __parameters__ and __origin__ problem - for now, we could just raise an exception for any substitutions which involve an unpacked arbitrary-length tuple, since I'd guess it's going to be an extremely rare use-case.
History
Date User Action Args
2022-04-05 20:03:02matthew.rahtzsetrecipients: + matthew.rahtz, gvanrossum, serhiy.storchaka, JelleZijlstra, kj, mrahtz, AlexWaygood
2022-04-05 20:03:02matthew.rahtzsetmessageid: <1649188982.59.0.913314772969.issue47006@roundup.psfhosted.org>
2022-04-05 20:03:02matthew.rahtzlinkissue47006 messages
2022-04-05 20:03:02matthew.rahtzcreate