You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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').
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.
Activity
ilevkivskyi commentedon Sep 26, 2016
Absolutely +1 on this. I will be glad to make a PR to
python/pepson this.gvanrossum commentedon Sep 26, 2016
OK, please go ahead with the PEP 484 PR. (I also couldn't find where it says that
ListmeansList[Any]-- it says something about subclassing without specifying parameters, but that's not relevant -- I'm just talking about usingListin type annotations. That meaning is uncontroversial, but if it isn't said somewhere it still ought to be mentioned.Clarify meaning of bare Tuple, etc. (#110)