Message381644
I think ((int, int), str) is superior to the others and if it can be made to work, that's what we should do.
Note that if variadic type proposals go anywhere (https://docs.google.com/document/d/1oXWyAtnv0-pbyJud8H5wkpIk8aajbkX-leJ8JXsE318/edit#), my understanding is we'd probably have to loosen the assumption that __args__ only contains types for that to work too.
(int, int, str) is temptingly easy, but I think it's a bad idea. For starters, PEP 612 loosens what X can be in Callable[X, str] and life is too short to spend time figuring out whether (P, str) is meant to be Callable[P, str] or Callable[[P], str].
I'm still trying to figure out how I feel about (Tuple[int, int], str). My initial reaction was negative / I think I'd be more comfortable with a (_Posargs[int, int], str). I don't think Tuple[int, int] would be a workable solution in the event that variadic types pose a similar problem. |
|
Date |
User |
Action |
Args |
2020-11-23 06:31:50 | hauntsaninja | set | recipients:
+ hauntsaninja, gvanrossum, serhiy.storchaka, levkivskyi, corona10, Zac Hatfield-Dodds, BTaskaya, kj |
2020-11-23 06:31:50 | hauntsaninja | set | messageid: <1606113110.66.0.759364097698.issue42195@roundup.psfhosted.org> |
2020-11-23 06:31:50 | hauntsaninja | link | issue42195 messages |
2020-11-23 06:31:50 | hauntsaninja | create | |
|