Width of tabs -- was: Re: vim configuration help

Gerhard Haering gh at ghaering.de
Tue Apr 15 06:07:10 EDT 2003


Mirko Zeibig wrote:
> Gerhard Haering wrote:
>>Karl Scalet wrote:
>>>looking in my vimrc file: [...]
>>>set tabstop=4
>>>[...]
>>
>>No, no, no! That's evil!
>>
>>Tabs are 8 characters wide. Period.
> 
> says who?

If the Python interpreter encounters a tab character in Python source 
code, it treats it as an equivalent of an indentation of 8 spaces.

Not knowing about this fact will only bite you if you mix tabs and 
spaces in Python sourcecode, which is a really silly thing to do in the 
first place (and python -t will warn you about it).

There's plenty of other software and hardware that behaves the same, 
though I'm not aware of any standard that would mandate this behaviour.

-- Gerhard






More information about the Python-list mailing list