2 ms·
Indentation is logic. Repeating logic is one of the greatest evils one can commit. http://en.wikipedia.org/wiki/Dont_repeat_yourself http://en.wikipedia.org/wik
by nailer 17y ago
Indentation is logic. Repeating logic is one of the greatest evils one can commit. http://en.wikipedia.org/wiki/Dont_repeat_yourself http://en.wikipedia.org/wiki/Dont_repeat_yourself
Re: parsing, read each line, if the indent is greater than the current indentlevel, add line to a new block, else, add line to existing block.
Tabs were considered harmful before Python, they're still considered harmful now.
You could add braces to Python quite easily, I think this has already been done in jest a few times...
- bugmenot 17y agoDRY: I only type braces, the editor does the indenting for me. And it's resistant to mistakes during cut/paste - refactoring of code.