4 ms·
> Try to write "find . -name '.py' | xargs cat | wc -l" in other languages. import pipe find(name='*.py') | xargs(cat) | wc().lines The implementation of
by icebraining 13y ago
> Try to write "find . -name '.py' | xargs cat | wc -l" in other languages.
import pipe
find(name='*.py') | xargs(cat) | wc().lines
The implementation of the functions is left as an exercise for the reader, but the syntax is valid.
https://github.com/JulienPalard/Pipe https://github.com/JulienPalard/Pipe
- stormbrew 13y ago> The implementation of the functions is left as an exercise for the reader This is kind of the point.
- xiaq 13y agoYes it's possible in Python, but doing that means working against all idioms and zens of Python. Languages are not only about what they make possible, but also about what they encourage.