Author kj
Recipients Jelle Zijlstra, brandtbucher, gvanrossum, jack__d, kj, levkivskyi, uriyyo
Date 2021-06-29.23:57:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAOMZG7i2deKU0WLWAFK85G-FoQspJzYE=T_Ur8LnMWoeufn90w@mail.gmail.com>
In-reply-to <1625006624.09.0.354347230774.issue44490@roundup.psfhosted.org>
Content
I don't think we need the types.GenericAlias(int | list[T], str)
workaround. GenericAlias already has code for extracting __parameters__ and
implementing __getitem__. Someone would need to refactor and reuse them for
Union too. That should be enough to trick GenericAlias to treat Union as
another GenericAlias(I don't remember if it checks for __origin__ as well)
and cover other edge cases as well.

@Yurii do you still plan to take this? If not, I'll start working on
something later today.
History
Date User Action Args
2021-06-29 23:57:06kjsetrecipients: + kj, gvanrossum, levkivskyi, Jelle Zijlstra, brandtbucher, uriyyo, jack__d
2021-06-29 23:57:06kjlinkissue44490 messages
2021-06-29 23:57:06kjcreate