On 24/05/20 10:26 am, Paul Sokolovsky wrote:
On Mon, 18 May 2020 13:25:50 +1200
Greg Ewing <greg.ew...@canterbury.ac.nz> wrote:
Or maybe we could leverage the new walrus operator and write
str := (int)
With the idea that someone may confuse ":=" for "<-", so we can swap
result and argument types comparing to their natural/intuitive order?
No, with the idea of making use of an already-legal expression and
not introducing any new syntax into the grammar.
But we indeed can treat
":=" as a function operator in annotations, and write:
(int) := str
But that would be backwards with respect to the flow of data when
:= is used for assignment. Also, it is not currently legal syntax
when there is more than one argument, because := doesn't support
unpacking.
--
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/IQP4PFE5SPS4F3TIJBAER3S3JEX5JPOF/
Code of Conduct: http://python.org/psf/codeofconduct/