New submission from Serhiy Storchaka <storchaka+cpyt...@gmail.com>:
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). ---------- components: Interpreter Core messages: 397528 nosy: gvanrossum, kj, serhiy.storchaka priority: normal severity: normal status: open title: Union of a type and the typing module function versions: Python 3.10, Python 3.11 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44642> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com