Author hongweipeng
Recipients abarry, alegonz, hongweipeng, levkivskyi, serhiy.storchaka, steven.daprano
Date 2019-10-09.10:38:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1570617538.93.0.324270320766.issue28869@roundup.psfhosted.org>
In-reply-to
Content
I think we can refer to typing.py, it does not have this issue.

>>> from typing import NamedTuple
>>> A = NamedTuple('A', [('name', str), ('id', int)])
>>> class B(NamedTuple):
...   name: str
...   id: int
... 
>>> A.__module__
'__main__'
>>> B.__module__
'__main__'


It uses `nm_tpl.__module__ = sys._getframe(2).f_globals.get('__name__', '__main__')`.
History
Date User Action Args
2019-10-09 10:38:58hongweipengsetrecipients: + hongweipeng, steven.daprano, serhiy.storchaka, levkivskyi, abarry, alegonz
2019-10-09 10:38:58hongweipengsetmessageid: <1570617538.93.0.324270320766.issue28869@roundup.psfhosted.org>
2019-10-09 10:38:58hongweipenglinkissue28869 messages
2019-10-09 10:38:58hongweipengcreate