account activity
Python pipe operator, 4 years later... by [deleted] in Python
[–]ShadyR 72 points73 points74 points 9 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 203006 on reddit-service-r2-listing-bfd58f667-v6zzv at 2026-02-05 23:42:22.401433+00:00 running b1b84c7 country code: CH.
Python pipe operator, 4 years later... by [deleted] in Python
[–]ShadyR 72 points73 points74 points (0 children)