[issue33077] typing: Unexpected result with value of instance of class inherited from typing.NamedTuple
16 Mar
2018
16 Mar
'18
10:56 a.m.
Ivan Levkivskyi <levkivskyi@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@python components: +Documentation nosy: +docs@python stage: -> needs patch _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue33077> _______________________________________
2397
Age (days ago)
2397
Last active (days ago)
0 comments
1 participants
participants (1)
-
Ivan Levkivskyi