[–] zweig 3y ago ↗ What *can't* you do in a single line of Python? ♥ [–] nimrody 3y ago ↗ Everything that requires a loop and is not expressible using list comprehensions.Really for one liners, Ruby (or even Perl) are much better. Python with its significant whitespace is a lot less convenient.The only advantage of Python is that it exists in the default installation usually - unlike Ruby. [–] timfi 3y ago ↗ This is not strictly true. Python expressions are in fact Turing complete. For example, you can implement an entire Brainfuck interpreter [0] in a single expression.[0] https://gist.github.com/6bab3480ab439f0e98f18d88750d3b38 [–] Mixtape 3y ago ↗ This is fascinating and absolutely could be its own submission. Excellent work.
[–] nimrody 3y ago ↗ Everything that requires a loop and is not expressible using list comprehensions.Really for one liners, Ruby (or even Perl) are much better. Python with its significant whitespace is a lot less convenient.The only advantage of Python is that it exists in the default installation usually - unlike Ruby. [–] timfi 3y ago ↗ This is not strictly true. Python expressions are in fact Turing complete. For example, you can implement an entire Brainfuck interpreter [0] in a single expression.[0] https://gist.github.com/6bab3480ab439f0e98f18d88750d3b38 [–] Mixtape 3y ago ↗ This is fascinating and absolutely could be its own submission. Excellent work.
[–] timfi 3y ago ↗ This is not strictly true. Python expressions are in fact Turing complete. For example, you can implement an entire Brainfuck interpreter [0] in a single expression.[0] https://gist.github.com/6bab3480ab439f0e98f18d88750d3b38 [–] Mixtape 3y ago ↗ This is fascinating and absolutely could be its own submission. Excellent work.
[–] Awelton 3y ago ↗ I love all of these no starch press books and have collected a pretty good pile of them next to my desk.
5 comments
[ 4.5 ms ] story [ 24.2 ms ] threadReally for one liners, Ruby (or even Perl) are much better. Python with its significant whitespace is a lot less convenient.
The only advantage of Python is that it exists in the default installation usually - unlike Ruby.
[0] https://gist.github.com/6bab3480ab439f0e98f18d88750d3b38