Skip to content

Clarify namedtuple member rules #1979

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

yangdanny97
Copy link
Contributor

@yangdanny97 yangdanny97 commented Apr 19, 2025

This PR clarifies the typing spec around named tuple fields and adds a few conformance test cases:

  • fields are not being allowed to begin with underscore (and its interaction with rename)
  • which members are counted/not counted as fields

Analogous restrictions are outlined in the spec for enums, but they are not present in the spec for named tuples.

Since this is adding new rules to the spec, should I open a discussion in the forum about it?

@yangdanny97 yangdanny97 marked this pull request as ready for review April 19, 2025 10:36
@erictraut
Copy link
Collaborator

Yes, please start a thread in the discussion forum. I don't think these changes will be controversial, but we should let the community weigh in.

@yangdanny97
Copy link
Contributor Author

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.

2 participants