Home Blog RSS

Pipes in Python

A feature I've always liked in languages, is the pipe operator. Some version of this can be achieved in haskell, elixir has it, and nix has a preview feature for it. And, most well known I think, bash has a pipe operator, though the way it operates on io streams is somewhat unique. Especially in interactive REPLs, like bash, the operator is super useful. So, this week I created a patch to cpython, that you can try out, that actually adds that! Though, to explain this, I think it's cool to talk a little about good syntax design, and what I call syntax that "goes with the direction of thought"!

Author:
jdonszelmann's github avatar jdonszelmann
Published: 2026-01-06
python