Re:Ask HN: Why Python over Ruby?
by earthboundkid on Thursday July 02, 2009 @05:40AM
(#684090)
PEP 8 specifies 4 spaces, not 1 tab. Python people generally prefer spaces to tabs, as do I, although I agree the semantically, it's a bit weird.
So the quote deals with mutability? I suppose that makes more sense, since Ruby tends to favor mutable objects. Of course, to my Python-based mind changing the definition of 'a' or 3 seems like a poor idea.
And as for indentation, I think Guido should have followed through with making tabs a syntax error
Surely you mean "making spaces a syntax error"? That would be much more sensible, since using spaces for indentation is absurd. Even better would be simply ignoring spaces, since that allows them to be used for pretty-printing and alignment without any potential ambiguity.
Also, the bug in your example will not be difficult to figure out, because Python will/should raise an exception when parsing the malformed file. Not everybody runs with -tt, but that ought to be the default behavior (and is anywhere I get to control the installation).