3 ms·
I was just thinking the same. There's not really any reason a shell can't have terse syntax for quick command things and explicit, careful syntax for things tha
by DangitBobby 4y ago
I was just thinking the same. There's not really any reason a shell can't have terse syntax for quick command things and explicit, careful syntax for things that require it. And if python had a pipe operator, you could basically do
open('file.txt') |> grep(?,"lasagna") |> set |> sorted
Which is really pretty good. It's not at all hard to imagine a Python that was designed to be good in the shell. They just didn't try.
- eviks 4y agoThere is a python-based shell https://xon.sh https://xon.sh with a plugin that allows piping :) https://github.com/anki-code/xontrib-pipeliner https://github.com/anki-code/xontrib-pipeliner