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)

--
Greg
_______________________________________________
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/ZWUTXNFIA5RRIBJQM2BDGAKMJZ33NIJG/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to