Hacker News new | ask | show | jobs
by trun 5247 days ago
Reminds me of something I saw not too long ago...

https://github.com/JulienPalard/Pipe

It would be really cool (though admittedly less Pythonic) to combine the infix notation provided by the Pipe library to allow more shell-like function chaining.

Instead of this...

  print wc(ls("/etc", "-1"), "-l")
You would have this...

  print ls("/etc", "-1") | wc("-l")
1 comments

There's a few ideas floating around here https://github.com/amoffat/pbs/issues/6 on how to implement it, but nothing looks really feasible. If you have any insights, I welcome them :)
I wrote some code for that a while ago: https://gist.github.com/1300342