TABs (was: Waffling between Python and Ruby)

David Bolen db3l at fitlinxx.com
Sun Jun 18 19:29:31 EDT 2000


Just van Rossum <just at letterror.com> writes:

> In general (ie. in the rest of the world, outside of emacs), a TAB has
> several perfectly good definitions. One of them is that it is always equal
> to 8 spaces. Another is that it is a variable thing.

Hmm, I've found a fixed space definition to be far less common than
anything else - in particular fixed column locations, which grew out
of the first TTYs with fixed tab locations.

> The fact that the "tab == 8 spaces" rule is a) not generally accepted and
> b) not generally enforcable across editors makes it IMHO a pretty useless
> definition. Tools that break when using anything but 8 are badly designed:
> it's like using two digits to store a year...

In this particular case, it's not so much that anything is actually
breaking (since the use in question was solely using TABs for
indentation), but that the visual indentation being enforced by
setting the editor to use 4 instead of the more common 8 just makes it
harder to get the same visual representation in other tools - without
somehow also adjusting each of those tools.

But I do agree with you that the fact that this sort of discussion
takes place over what a TAB really should be defined to do makes it
largely unsuitable for use in code that is meant to be distributed and
shared.

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list