bpo-36320: Switch typing.NamedTuple from OrderedDict to regular dict by rhettinger · Pull Request #12396 · python/cpython

@rhettinger

@rhettinger

@rhettinger

ilevkivskyi

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.

gvanrossum

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

@miss-islington

@rhettinger: Status check is done, and it's a success ✅ .