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
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/77OWDBQPQKDDQ3CGHUC4PY6ODI3LUBY3/
Code of Conduct: http://python.org/psf/codeofconduct/