[Python-ideas] Adding a pipe function to functools
Wes Turner
wes.turner at gmail.com
Sat Apr 16 02:04:25 EDT 2016
On Apr 16, 2016 12:07 AM, "Steven D'Aprano" <steve at pearwood.info> wrote:
>
> On Fri, Apr 15, 2016 at 01:51:45PM -0500, Wes Turner wrote:
>
> > *
https://docs.python.org/3.1/howto/functional.html#the-functional-module
> >
> > from functional import compose, partial
> > import functools
> > multi_compose = partial(functools.reduce, compose)
> >
> > * https://docs.python.org/3.5/library/functools.html
> >
> > * functools.compose is gone!
>
> functools.compose never existed. The above example is
> functional.compose, a third party library.
my mistake. in my haste, I had thought that functional was functools.
it looks like funcy has both curry() and compose():
* http://funcy.readthedocs.org/en/stable/funcs.html#curry #compose
* https://github.com/Suor/funcy/blob/master/funcy/funcs.py #compose
* https://github.com/Suor/funcy/blob/master/funcy/simple_funcs.py #curry
and fn.py has __lshift__ and __rshift__ for F.__compose:
* https://github.com/kachayev/fn.py/blob/master/fn/func.py
*
>
>
>
> --
> Steve
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160416/cd297620/attachment.html>
More information about the Python-ideas
mailing list