8000 Clarify what unparameterized Tuple means · Issue #284 · python/typing · GitHub
[go: up one dir, main page]

Skip to content

Clarify what unparameterized Tuple means #284

New issue
8000

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
gvanrossum opened this issue Sep 26, 2016 · 2 comments
Closed

Clarify what unparameterized Tuple means #284

gvanrossum opened this issue Sep 26, 2016 · 2 comments

Comments

@gvanrossum
Copy link
Member

Currently when you annotate something as Tuple, mypy interprets this as a 0-length tuple. I don't like this. PEP 484 is silent on the matter, but in analogy of List I'd like it to mean Tuple[Any, ...], which is also equivalent to tuple (lowercase 't').

@ilevkivskyi
Copy link
Member

Absolutely +1 on this. I will be glad to make a PR to python/peps on this.

@gvanrossum
Copy link
Member Author

OK, please go ahead with the PEP 484 PR. (I also couldn't find where it says that List means List[Any] -- it says something about subclassing without specifying parameters, but that's not relevant -- I'm just talking about using List in type annotations. That meaning is uncontroversial, but if it isn't said somewhere it still ought to be mentioned.

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

No branches or pull requests

2 participants
0