[docs] [issue33077] typing: Unexpected result with value of instance of class inherited from typing.NamedTuple

Ivan Levkivskyi report at bugs.python.org
Fri Mar 16 06:56:45 EDT 2018

Ivan Levkivskyi <levkivskyi at gmail.com> added the comment:

> Apart from the fact that it's too late, if you had to do it over again,
could it be done as a class decorator?

Yes, this could be done as a decorator which would replace the original class with a named tuple after inspecting `__annotations__` and `__dict__`. (But again, the name would be different, since `@NamedTuple` looks weird to me.)

assignee:  -> docs at python
components: +Documentation
nosy: +docs at python
stage:  -> needs patch

Python tracker <report at bugs.python.org>

More information about the docs mailing list