Author kj
Recipients gvanrossum, kj, serhiy.storchaka
Date 2021-07-14.15:27:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1626276447.91.0.034829421667.issue44632@roundup.psfhosted.org>
In-reply-to
Content
Oh this is a fun one :).

> The code for recognizing TypeVars must be wrong. Is it also wrong in e.g. list[T]?

list[T] is correct. I was pretty puzzled since I thought their code is nearly the same, but then I noticed a subtle difference -- GenericAlias checks for type(o).__module__ == "typing", while Union checks for o.__module__ == "typing", and o.__module__ is wherever the user defines it.
History
Date User Action Args
2021-07-14 15:27:27kjsetrecipients: + kj, gvanrossum, serhiy.storchaka
2021-07-14 15:27:27kjsetmessageid: <1626276447.91.0.034829421667.issue44632@roundup.psfhosted.org>
2021-07-14 15:27:27kjlinkissue44632 messages
2021-07-14 15:27:27kjcreate