Really,
I don't think new syntax is needed for that, as it is trivially resolved
by a function call

(I would type an example but Ricky's answer covers it)

Moreover, such a callable, or other helper-callables
can trivially enable ways of connecting the piped
values through specific (positional/named) parameters
in the next calls - allowing a whole Graph of functions
to be composed.

(And it is so easy to do and flexible extendable, I can't see a place for
that
in the stdlib)



On Mon, 25 May 2020 at 00:11, Ricky Teachey <ri...@teachey.org> wrote:

> Here's another whacky idea: how about adding a so-called FuncSeq to the
> collections library for composing functions?
>
> Since FuncSeq is (obviously) a sequence, that might help with the
> intuition of the function application order. The idea is the function
> application order is the same as the iteration order of the sequence:
>
> from collections import FuncSeq
>
> fun_seq = FuncSeq([str, len])
> fun_seq(789)  # 3
> fun_seq[::-1]("789")  # '3'
>
> ---
> Ricky.
>
> "I've never met a Kentucky man who wasn't either thinking about going home
> or actually going home." - Happy Chandler
>
>
> _______________________________________________
> 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/IFTDGP3JLYFI3YZZDPFKIRA7QBV73W2N/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
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/DTFJQMWUT2SO276JLR3JY5XCZRNSKAUU/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to