Tabs are *MISUNDERSTOOD*, *EVIL* AND *STUPID*, end of discussion. (Re: Tabs versus Spaces in Source Code)

Duncan Booth duncan.booth at invalid.invalid
Fri May 19 03:18:03 EDT 2006


PoD wrote:
> I think it is universally accepted that mixed tabs and spaces is indeed
> **EVIL**
> 
> I should have said any code using tabs exclusively.
> 
Can you point at any significant body of publically visible Python code 
which uses tabs exclusively? All of the Python projects I've ever been 
involved with use spaces only as a convention (although as I pointed out in 
my previous post, some with more success than others).

The problem with conventions such as 'tabs only' or 'space only' is that 
they only work if everyone sticks to the conventions, and it helps if the 
same conventions are in place everywhere (otherwise people forget when they 
switch from one project to another). Also, in the open source universe you 
are quite likely to pull in bits of code from other projects, and you don't 
want to either have to reformat it or to switch your editor settings for 
some files.

My experience of programming with either spaces or tabs has taught me 
that tabs are evil not for themselves, but simply because no matter how 
hard you try they always end up being mixed with spaces.

Do you know of any open-source projects which actually try to enforce a 
'tab only' convention for Python? I'd really like to see a similar scan 
over some 'tab only' code as I did over Plone to see whether they actually 
manage to remain 'pure'.



More information about the Python-list mailing list