New Guy

Terry Reedy tjreedy at udel.edu
Wed Nov 19 17:16:46 EST 2003


"Jim" <Whitewater at hotmail.com> wrote in message
news:3l3nrv8p6a2jjv3erq9j4pc75tn9p6b5os at 4ax.com...
> On Wed, 19 Nov 2003 10:57:36 GMT, "Georgy Pruss"
<see_signature__ at hotmail.com> wrotf:
>
> >OMG! The first rule about the source code - NEVER USE TABS!

> Why is that?

The premise of that recommendation is that you want as many people as
possible to read your code as written and indented, coupled with the
fact that tabs get mangled or deleted more often than spaces.
(Outlook Express, which comes 'free' with Windows, converts tabs to 4
spaces on entry but just deletes them on received messages.)

On the other hand, if that premise is wrong and you wish to filter out
'stupid' people who use 'brain-dead' software (like Outlook Express),
then do use tabs ;-)  I did not even try to read your code.

> If I have my IDE set up so that the tabs are the same thing as 4
spaces,
> what't the difference?
> I just don't see why I would want to press the space bar 4 times
> when I can hit the Tab
> key once for the same effect. What am I missing here?

Some editors (like PythonWin that I know of) convert a Tab press to n
spaces, so you do hit Tab just once or a few times and get n times as
many spaces in the file.  A Python-aware editor (again like PythonWin)
will also, when the cursor is on an indent spot, convert Backspace to
n (4) backspaces, so that dedent is again just one keypress.

Terry J. Reedy






More information about the Python-list mailing list