Skip to content

Make NamedTuple accept Text names (#2761). - #2762

Merged
srittau merged 5 commits into
python:masterfrom
panhania:namedtuple-anystr
Feb 9, 2019
Merged

srittau merged 5 commits into
python:masterfrom
panhania:namedtuple-anystr

Conversation

@panhania

Copy link
Copy Markdown

Both type and field names of NamedTuple can be specified with unicode strings now.

This fixes #2761.

Comment thread stdlib/2/typing.pyi Outdated

@srittau srittau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix, but please use Text per CONTRIBUTING file. We have gone a bit to and fro in the past around this issue, but this is what we have settled on and should be the most compatible.

@srittau

srittau commented Feb 9, 2019

Copy link
Copy Markdown
Collaborator

(Also restarted CI, since the travis failure did not seem related to the PR.)

Comment thread stdlib/2/typing.pyi Outdated
@panhania panhania changed the title Make NamedTuple accept AnyStr names (#2761). Make NamedTuple accept Text names (#2761). Feb 9, 2019
@srittau
srittau merged commit c8c6271 into python:master Feb 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

typing.NamedTuple should accept unicode names

3 participants