[Python-ideas] Adding a pipe function to functools

Steven D'Aprano steve at pearwood.info
Fri Apr 15 13:04:13 EDT 2016


On Fri, Apr 15, 2016 at 09:41:41AM -0400, Ed Minnix wrote:
> Hello,
> 
> I have been looking over the toolz library and one of the functions I 
> like the most is pipe. Since most programmers are familiar with piping 
> (via the Unix `|` symbol), and it can help make tighter code, I think 
> it would be nice to add it to the standard library (such as 
> functools).


I don't know the toolz library, but I have this:

http://code.activestate.com/recipes/580625-collection-pipeline-in-python/

Is that the sort of thing you mean?

It's certainly not ready yet for the std lib, but if there's interest in 
it, I should be able to tidy it up and publish it. 



-- 
Steve


More information about the Python-ideas mailing list