3 ms·
Why is it that people hate active whitespace? I think it's great that the parser can detect where blocks end just by maintaining a nice code structure. I guess
by jdp 17y ago
Why is it that people hate active whitespace? I think it's great that the parser can detect where blocks end just by maintaining a nice code structure. I guess people are just against it on principle? Just in edge cases where indenting wouldn't make sense?
- jackowayed 17y agoOne question, does python have an equivalent to irb (http://en.wikipedia.org/wiki/Interactive_Ruby_Shell http://en.wikipedia.org/wiki/Interactive_Ruby_Shell)? If so, how do you get into/out of blocks?
- paulgb 17y agoYup. If you start the python interpreter, it opens up into an interactive shell. You still have to indent inside the block, and python interprets the code after you enter a blank line. ipython is an improved python shell, with tab-completion and some other cool features.
- paulgb 17y agoI think to some extent the whitespace is symbolic of a larger issue with python: the interpreter thinks it knows best. Most people still come from a "wild-west" C-family language (or worse yet, perl) where your code can be as clever and concise code as you want. To me, python's "one true way" philosophy felt too paternalistic. So yeah, I guess you could call it a matter of principle. (Python has become my main language since, but I never claimed to have strong principles :) )