Making tabs illegal

Thomas Wouters thomas at xs4all.net
Sun Jul 9 05:56:43 EDT 2000


On Sat, Jul 08, 2000 at 11:29:40PM -0600, David Porter wrote:

> > > You should get a decent editor.

> > You have missed my point entirely - I am arguing against the banning of
> > tabs - my editor does tabs, syntax highlighting and autoindenting.

> I believe that he is saying that a decent editor can be configured to use
> four spaces when you hit tab, so that is no reason to not ban tabs. Emacs
> with Python Mode converts the pressing of a tab to four spaces and it
> auto-indents with four spaces. 

There are plenty of editors (like those that aren't an OS an sich ;) that
don't do expansion of tabs into spaces. Like Windows Notepad. Banning tabs
altogether is quite the radical move, given that tabs aren't the problem,
users are ;) Tabs work fine, spaces work fine, but mixing tabs and spaces
are what can cause problems. (Well, setting tabstops at something other than
every 8th character is the real problem, of course!)

Python has the -tt option, which prevents usage of tabs and spaces, mixed,
as indentation. It might become default in the future, or it might not.
Until then, always call python -tt, and either use spaces or tabs. Those
AI-editors of yours can auto-determine the indentation-style of the script
you are editing, even if it's someone else's, and make you insert the right
indentation without you knowing it.

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!




More information about the Python-list mailing list