Serhiy Storchaka <[email protected]> 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 <[email protected]>
<https://bugs.python.org/issue34963>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com