Skip to content

Change meaning of unparameterized Tuple to Tuple[Any, ...] (== tuple) #2184

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

Comments

@gvanrossum
Copy link
Member

Currently, Type (without parameters) means a 0-length tuple, IOW Tuple[()] (which is the PEP 484 way to spell it). Analogy with List suggests it should be an unconstrained tuple, i.e. Tuple == tuple == Tuple[Any, ...]. The second half is already true. The List analogy is List == list == List[Any]. (The last part of that is spelled differently, but is a closer analogy to Tuple[Any, ...] than to Tuple[Any], since the latter is constrained to 1-length tuples.)

@gvanrossum
Copy link
Member Author

See also python/typing#284

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

1 participant