18 May
2020
18 May
'20
7:09 a.m.
On 2020-05-18 02:25, Greg Ewing wrote:
On 18/05/20 1:59 am, Paul Sokolovsky wrote:
But even {(int): str} is a better type annotation for a function than Callable[[int], str].
I don't agree -- it looks more like some kind of dict type, and would be better reserved for that purpose.
And if we e.g. talk about making "->" a special operator which would allow it to appear in other contexts
Or maybe we could leverage the new walrus operator and write
str := (int)
It would be closer to the existing annotation if we could write: [int] -> str