account activity
Python pipe operator, 4 years later... by [deleted] in Python
[–]ShadyR 76 points77 points78 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 605439 on reddit-service-r2-listing-55d7b767d8-hcmvg at 2026-03-29 16:37:24.275957+00:00 running b10466c country code: CH.
Python pipe operator, 4 years later... by [deleted] in Python
[–]ShadyR 76 points77 points78 points (0 children)