Message365783
| Author | serhiy.storchaka |
|---|---|
| Recipients | gvanrossum, levkivskyi, serhiy.storchaka |
| Date | 2020-04-04.21:08:44 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1586034525.17.0.360408189871.issue40185@roundup.psfhosted.org> |
| In-reply-to |
| Content | |
|---|---|
typing.NamedTuple is used in two ways. 1. It is a callable which produces a new namedtuple type. 2. It can also be used as a base in the class statement for creating a new namedtuple type. In both cases it is not a real class. You cannot create an instance of NamedTuple or a subclass of NamedTuple. But it is implemented as a class, and help() shows methods and data descriptors for it, which are useless. The proposed PR implements NamedTuple like a function. Implementation of the __mro_entries__ method allows to use it as a base in the class statement. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2020-04-04 21:08:45 | serhiy.storchaka | set | recipients: + serhiy.storchaka, gvanrossum, levkivskyi |
| 2020-04-04 21:08:45 | serhiy.storchaka | set | messageid: <1586034525.17.0.360408189871.issue40185@roundup.psfhosted.org> |
| 2020-04-04 21:08:45 | serhiy.storchaka | link | issue40185 messages |
| 2020-04-04 21:08:44 | serhiy.storchaka | create | |