TABs (was: Waffling between Python and Ruby)

Just van Rossum just at letterror.com
Sat Jun 17 03:49:03 EDT 2000


At 5:16 PM -0400 16-06-2000, David Bolen wrote:
>A TAB character has a perfectly good definition, and artifically
>mucking with that definition just within the environment of your
>editor is going to pretty much ensure that any other application that
>expects the normal behavior will present or parse your files
>differently.  Besides, Emacs makes it so easy to maintain indentation
>at any level without changing the basic tab size.

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. If you stick to the
first you'll have trouble with people who don't follow the rule and mix
tabs with spaces. If you follow the second, you'll "only" have trouble with
people mixing tabs with spaces. So the only thing we can say for sure is
"don't mix tabs with spaces".

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...

Just






More information about the Python-list mailing list