Re: [Python-ideas] Adding a pipe function to functools
On Apr 16, 2016 12:07 AM, "Steven D'Aprano" email@example.com wrote:
On Fri, Apr 15, 2016 at 01:51:45PM -0500, Wes Turner wrote:
from functional import compose, partial import functools multi_compose = partial(functools.reduce, compose)
- 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:
-- Steve _______________________________________________ Python-ideas mailing list Pythonfirstname.lastname@example.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/