bpo-36320: Switch typing.NamedTuple from OrderedDict to regular dict by rhettinger · Pull Request #12396 · python/cpython
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I just have one suggestion about docs.
| ``_fields`` attribute, which is part of the namedtuple API.) | ||
| The resulting class has an extra attribute ``__annotations__`` giving a | ||
| dict that maps the field names to the field types. (The field names are in | ||
| the ``_fields`` attribute, which is part of the namedtuple API.) |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously _field_defaults were also mentioned, maybe also keep them mentioned as "part of the namedtuple API"?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the idea. I have no time for a thorough code review, but you got that from Ivan.
@rhettinger: Status check is done, and it's a success ✅ .
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters