3 ms·
I indent my Perl code. Not everyone does, however. It's a trivial task to reformat it in an editor. But in Python, you don't even have to worry about other peo
by jsankey 16y ago
I indent my Perl code. Not everyone does, however. It's a trivial task to reformat it in an editor.
But in Python, you don't even have to worry about other people not indenting their code!
I guess the only complaint I might have is why bother thinking about indentation, ever? Throw in a couple of {} and now the tools can provide additional help.
When you edit Python, the tools can already help as much. The start of a block is obvious (def, if, for, etc), so tools indent for you. To dedent, just hit the right key (e.g. a backspace on an empty line in emacs) -- no harder than hitting the brace key.
- dmn001 16y agoYou do have to worry as their Python code produces errors if they do not indent it properly! I don't like Python either and prefer Perl. (In Python I did not like indentations, dicts, tuples, lists, and the IDLE gui.)