Proposal: Official whitespace response
tottinge at concentric.net
Tue Feb 22 15:42:20 CET 2000
>Inbetween all the bickering, I got a lot of useful information. It
>would be nice to summarize these points in a succinct, factual manner.
Would have been cool to get it without the bickering, though.
>First and foremost, I did not find in the FAQ, or in any of my searching
>around on www.python.org, or in any place in Mark Lutz's _Programming
>Python_ that was clear from the TOC or index, or in the 1/3 of the tome
>I've read so far, any sort of clue into the really incredibly obvious
>question that is underneath all this: "How do you deal with tabs vs.
>I don't know why this is so hidden. I think any reasonable FAQ on the
>matter must state, in some obvious and up-front way THE PYTHON
>INTERPRETER ALWAYS INTERPRETS A TAB AS 8 SPACES. There was a quote from
>Guido's guide to programming style (or something like that -- NOT the
>first document I'd look at when trying to figure out how the dang thing
>works) that was quite to the point somewhere in the responses to my post
>that was quite to-the-point which I think you should probably use.
Every non-M$ programmer I know sets tabs to 8 spaces, shifts/indents
to 4, and most of them set whatever editor they use to write spaces
rather than tabs.
I do this in vim, M$ IDE (when forced to use it), and in all other
editors I've ever used for code work. When you print text, it expands
tabs to 8 chars normally, so most developers automagically (without
thinking) either use 8-char tabs, or don't use them.
I hate the little beasties, and am not so pressed for disk space that
I'd use them to save 7 bytes each.
So I think we all overlook the errors that we don't personally commit.
That's just humanity, not pythonity. Who would have thought it?
More information about the Python-list