Have spent the last two days working with D'Arcy, who uses vi (that's, vi, not even vim). And every 10 or 20 minutes he'll mis-indent something because he uses spaces. It's often subtle, like a closing-bracket being outdented one line too many (which works fine if it's the last line of a function), such that adding a new line of code after it at the same indentation causes an error.
Tabs are the one true way to write Python code. One keystroke is one character, configurable according to user preferences, large enough to not have to guess at alignment (which you have to do constantly with spaces (particularly in vi)).
Oh, and using \ at the end of a line should be a last resort. Use brackets to format calls or lists on multiple lines. And if a line is going to be 100 characters long, accept it. It's perfectly servicable that way.
You shouldn't spend hours reformatting lines to look like this:
variable = \
"some string with format characters " \
"more of the same string" % \
( somevalue, othervalue )
There's no room for debate. I'm right. Stop arguing with me :) .
Pingbacks are closed.