Deprecate tabs for indenting (was Re: Indenting with tabs vs spaces)

Fernando Pérez fperez528 at yahoo.com
Sat Dec 1 16:10:50 EST 2001


Jeff Hinrichs wrote:

> my 0.02$US:
> Actually, spaces are the problems not tabs.  A tab is a tab, where
> is indenting by spaces....hmm.
> let's see, I like 4 spaces, he like 8 and she likes 6 and so on. 
> That causes more grief than tabs.
> Where as tabs, 1 tab = 1st level block, 2 tabs = 2nd level block and
> so on.
> 
> Maybe if people didn't use such brain dead editors that actually
> replaced
> tabs with spaces this would be a complete non-issue.  You should be
> able to configure your editor to display tabs in a width that is to
> your liking
> WITHOUT mucking with the data.  As it is, we are doomed to listen to
> this argument go on ad nauseum.
> 

In theory, I agree with you. Reality, as always, is more complicated. 
But not because of brain-dead editors. Even if you could rid the 
world of those, and were left with only god-fearing, tab-respecting 
editors, you'd still have  a problem: *not all code is typed by hand*.

Pasting. There's the breaker for this issue. One of the beauties of 
python is the interactive prompt, right? You type some code, if it 
works you highlight, middle click and off you go. Well, try it and 
see where your tabs go. Or the web, or newsgroups, or email... There 
are *many* situations which don't preserve tabs as tabs, and code 
flows through them. So forget about it.

Again, in an ideal world where not only editors but *every 
conceivable piece of software that can display text* respected tabs 
as tabs, your idea would work.

Welcome to reality.

f.



More information about the Python-list mailing list