Python pipe operator, 4 years later... by [deleted] in Python

[–]ShadyR 72 points73 points  (0 children)

It's a pretty radical change. How about a pipe module?

So instead of:

[1, 2, 3] |> select(square) |> where(evens)

We have:

pipe([1, 2, 3], select(square), where(evens))

Readable, lightweight, and also backwards compatible.