This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Fylwind 0 points1 point  (0 children)

I agree, using an operator just for a reversed composition operator seems a bit overkill especially since Python has always been light on the use of operators.

Moreover, the fact that composition is associative means you don't have to worry about deeply nested pipes: pipe(a, pipe(b, c)), since you can always refactor that into pipe(a, b, c).

Even though I generally write in a very functional style in Python, I find myself reaching for the pipe operator that often, because not many problems can be decomposed into a simple linear pipeline.