On Fri, 27 Jan 2017 at 21:29 Ethan Furman <et...@stoneleaf.us> wrote:

On 01/27/2017 01:07 PM, Brent Brinkley wrote:
> Suggested structure:
>
>   print() <| some_func() <| another_func("Hello")

My first question is what does this look like when print() and some_func()
have other parameters?  In other words, what would this look like?

     print('hello', name, some_func('whatsit', another_func('good-bye')),
sep=' .-. ')


This idea doesn't solve the general problem well, but I'm not convinced
that it needs to; that can be addressed by making partial function
application syntax nicer. Although I think it's probably fairly useful
anyway.

FWIW, I'd spell it without the (), so it's simply a right-associative
binary operator on expressions, (a -> b, a) -> b, rather than magic syntax.

    print XYZ some_func XYZ another_func("Hello")
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to