Tab indentions on different platforms?

Ben Finney bignose+hates-spam at benfinney.id.au
Sun Dec 30 20:36:11 EST 2007


Steven D'Aprano <steve at REMOVE-THIS-cybersource.com.au> writes:

> On Sun, 30 Dec 2007 20:41:09 +0000, Thorsten Kampe wrote:
> 
> > Anyway: the consequence of your well done argumentation is that
> > someone editing Python code has to use a specialised editor to prevent
> > screwing up tab indented code - and that's bad.
> 
> You just need to use an editor that inserts tab characters when the
> tab key is pressed, just like you use an editor that inserts s
> characters when the s key is pressed.

No, that's not all you need to do. You also need to keep your code
away from the majority of programmers, who use their default editor in
its default settings, and who expect that horizontal whitespace is
produced by the U+0020 space character (even if they don't know the
specifics of the character coding).

Saying that the tabs-only argument and the spaces-only argument are of
equal value is philosophically true, but practically worthless.
They're of equal value *only* in isolated environments where you can
control the expectations of *every* programmer who will *ever* edit
the file.

To form an indentation policy based only on hypothetical
fully-controlled isolated environments is foolish, to say the least.

-- 
 \          "If you can't beat them, arrange to have them beaten."  -- |
  `\                                                     George Carlin |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list