Skip to content
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

Add a backport of generic NamedTuples #44

Merged
merged 21 commits into from May 26, 2022

Conversation

AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented May 20, 2022

This PR backports the ability, added in python/cpython#92027, to define generic NamedTuple classes. The implementation and the tests are very similar to the implementation on the CPython main branch, with a few tweaks so that it all works on earlier versions of Python as well.

#7

@AlexWaygood AlexWaygood marked this pull request as ready for review May 20, 2022 19:48
@AlexWaygood
Copy link
Member Author

I think this is now ready for review!

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

I don't really claim to know what's going in this code, but everything seems reasonable and makes sense to me, but I have a few small remarks.

README.md Outdated Show resolved Hide resolved
src/test_typing_extensions.py Show resolved Hide resolved
src/typing_extensions.py Outdated Show resolved Hide resolved
src/typing_extensions.py Outdated Show resolved Hide resolved
Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

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

Thank you! I have a few small comments.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/test_typing_extensions.py Show resolved Hide resolved
src/test_typing_extensions.py Outdated Show resolved Hide resolved
src/typing_extensions.py Show resolved Hide resolved
src/typing_extensions.py Outdated Show resolved Hide resolved
src/typing_extensions.py Outdated Show resolved Hide resolved
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
@JelleZijlstra JelleZijlstra merged commit 7c28357 into python:main May 26, 2022
@JelleZijlstra
Copy link
Member

Thank you!

@AlexWaygood AlexWaygood deleted the namedtuple branch May 26, 2022 04:48
@AlexWaygood
Copy link
Member Author

Thank you! Super excited to see this happen :D

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.

None yet

3 participants