On Wed, Dec 1, 2021 at 9:09 AM Abdulla Al Kathiri <alkathiri.abdu...@gmail.com> wrote: > > How about using the typing return arrow -> to indicate the return of the > preceding goes as a first parameter in the function: > 1 -> add(2)
That's a possibility. The same arrow then means "this function produces that value" in a definition, and "this value then goes into that function" in an expression. > I don’t like the fact this is used only as a first parameter. What if you > want the preceding output to go as a second parameter? > Abdulla > Then write it the classic way. The vast majority of the time, you'll want it to be the first parameter. It's like how dot chaining of methods only works for the return value becoming the 'self' parameter - yes, that's incredibly restrictive, but in real world situations, that's easily the most common form needed. Otherwise you end up with a much more complicated proposal with far less beauty to it. ChrisA _______________________________________________ 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/UYM2YKWFTEXJW27CIM4KZRO5FIEYIW4O/ Code of Conduct: http://python.org/psf/codeofconduct/