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 serhiy.storchaka
Recipients gvanrossum, kj, pablogsal, serhiy.storchaka
Date 2021-07-24.09:24:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1627118660.44.0.542723113695.issue44732@roundup.psfhosted.org>
In-reply-to
Content
There are differences between typing.Union and types.Union:

* typing.Union is indexable, types.Union is not.
* types.Union is a class, typing.Union is not.

types.Union corresponds to typing._UnionGenericAlias, not typing.Union. It is confusing that typing.Union and types.Union have the same name. Note also that most classes in the types module have the "Type" suffix: FunctionType, MethodType, ModuleType, etc. I think that it would be better to rename types.Union to types.UnionType.
History
Date User Action Args
2021-07-24 09:24:20serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, pablogsal, kj
2021-07-24 09:24:20serhiy.storchakasetmessageid: <1627118660.44.0.542723113695.issue44732@roundup.psfhosted.org>
2021-07-24 09:24:20serhiy.storchakalinkissue44732 messages
2021-07-24 09:24:20serhiy.storchakacreate