Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
PR 9951 is a simpler way. It just sets __qualname__ (and __module__ for completeness). >>> import typing >>> UserId = typing.NewType('UserId', int) >>> UserId <function UserId at 0x7f1386ac77e0> ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34963> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com