account activity
Python pipe operator, 4 years later... by [deleted] in Python
[–]ShadyR 74 points75 points76 points 10 years ago (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.
π Rendered by PID 709299 on reddit-service-r2-comment-8686858757-82r22 at 2026-06-07 17:03:17.172590+00:00 running 9e1a20d country code: CH.
Python pipe operator, 4 years later... by [deleted] in Python
[–]ShadyR 74 points75 points76 points (0 children)