Tab wars revisited (was Re: Python indentation)

Thomas Bellman bellman at lysator.liu.se
Thu Jul 8 13:04:12 CEST 2004


Steve Lamb <grey at despair.dmiyu.org> wrote:

>    Yes.  Name the number of spaces a TAB should translate into.  

Up to the next tab stop, and tab stops are placed at every 8th
column.  No more, no less.

>    That was easy.  Now explain why your answer is right and the next guy's
> answer, which is different than yours, is wrong.

Because that's the way it has been since time eternal.  Every
terminal I have seen have had tab stops at every 8th column.
Every printer I have encountered does the same (if it supports
plain text ASCII, that is; EBCDIC printers is of course a
different matter, but Python doesn't support EBCDIC anyway).

> TAB, by it's very nature, is a variable and
> configurable width.

The character code 91 (decimal) is by its very nature configurable
what it means.  For instance, some years ago here in Sweden it
was popular to configure your display device to show it as a
capital letter A with diaresis.  Yet, Python absolutely believes
that it is an opening square parenthesis.

The fact that some people are doing broken things (configuring
their editors to have tab stops at other than every 8th column)
is not enough for me to give up tabs.  It is *their* problem if
they do such stupid things.


-- 
Thomas Bellman,   Lysator Computer Club,   Linköping University,  Sweden
"I don't think [that word] means what you    !  bellman @ lysator.liu.se
 think it means."   -- The Princess Bride    !  Make Love -- Nicht Wahr!



More information about the Python-list mailing list