Ivan Levkivskyi <levkivs...@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 <rep...@bugs.python.org> <https://bugs.python.org/issue33077> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com