`functools.pipe` - Function Composition Utility
pipe is not a def/lambda alternative in the same way that partial is not. Same as partial, it is a functional utility, which takes callables as arguments and returns a derivative result. pipe, same as partial compared to def, although superficially seems to do the same thing, has a different role and advantages in functional programming. There is no single pressing problem which this solves, but the case that I have gathered judges the combined benefit of this in various places in relation t...
discuss.python.org · Discussions on Python.org