Non-Indented python

Jeff Shannon jeff at ccvcorp.com
Wed Nov 28 14:33:08 EST 2001


Huaiyu Zhu wrote:

> On Tue, 27 Nov 2001 18:34:18 +0000 (UTC), Marcin 'Qrczak' Kowalczyk
> <qrczak at knm.org.pl> wrote:
>
> >Let's suppose I'm editing a file written by somebody else. I want to
> >insert a statement so I hit Enter at the end of a line. The editor
> >automatically indents the new line. Later it causes SyntaxError
> >because the file happened to use tabs and I've set my editor to use
> >spaces for indentation.
>
> An easy and brutal solution is to mandate that tab is the only indent
> charactor.  A better long term solution is to write a smarter
> python-mode for your editor.

An easier and less brutal solution is to mandate that space is the only
indent character.  It's easier to teach your editor to convert tabs to
spaces as you type them, than it is to teach every single person who might
ever want to write a short Python script that spaces don't work.

Jeff Shannon
Technician/Programmer
Credit International





More information about the Python-list mailing list