Skip to content

gh-129343: Add _repr method to named tuples #129353

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

Closed
wants to merge 1 commit into from

Conversation

bswck
Copy link
Contributor

@bswck bswck commented Jan 27, 2025

@bswck
Copy link
Contributor Author

bswck commented Jan 27, 2025

Concern to address: duplication of repr docs in the help string.

My idea: change the __repr__ docstring to a different one, underlining its overridability.

@bswck
Copy link
Contributor Author

bswck commented Jan 27, 2025

This PR assumes super() works in typing.NamedTuple subclasses, so it is blocked by #129352.

@rhettinger rhettinger self-assigned this Jan 28, 2025
@rhettinger rhettinger closed this Feb 3, 2025
@bswck bswck deleted the add-namedtuple-_repr branch February 3, 2025 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants