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, serhiy.storchaka
Date 2021-07-15.07:58:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The union type accepts any function from the typing module:

>>> import typing
>>> int | typing.cast
int | typing.cast
>>> int | typing.get_type_hints
int | typing.get_type_hints

It is a consequence of too lenient check for the typing.NewType() result (which does not work at all with PR 9951).
Date User Action Args
2021-07-15 07:58:18serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, kj
2021-07-15 07:58:18serhiy.storchakasetmessageid: <>
2021-07-15 07:58:18serhiy.storchakalinkissue44642 messages
2021-07-15 07:58:18serhiy.storchakacreate