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

Added draft chapter to typing spec for tuples. #1599

Merged
merged 8 commits into from
Jan 26, 2024

Conversation

erictraut
Copy link
Collaborator

This consolidates and augments existing information about tuples within the type system.

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

I'll sign off. I have one English grammar nit.

I also wonder if we ought to say something about sequence unpacking? I recall being confused for a while when trying out some tuple examples in the mypy sandbox until I realized that x: int; y: int; x, y = blah() is very different than xy: tuple[int, int] = blah(). It's probably not on-topic for this section though.

@erictraut
Copy link
Collaborator Author

I've written conformance tests for the new "tuples" section to see where the four major type checkers deviate from the spec. Results are in this PR.

@erictraut erictraut marked this pull request as ready for review January 26, 2024 07:36
@erictraut erictraut merged commit 02fc524 into python:main Jan 26, 2024
4 checks passed
@erictraut erictraut deleted the tuples_spec branch January 26, 2024 07:37
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.

6 participants