Indenting with tabs vs spaces

Peter Hansen peter at engcorp.com
Fri Nov 23 01:01:37 CET 2001


Top-posting error corrected...

Peter Bismuti wrote:
> "David Eppstein" <eppstein at ics.uci.edu> wrote:
> >  "Peoter Veili" <peoter_veliki at hotmail.com> wrote:
> >
> > > Indenting with tabs can be done such that it will look the same on every
> > > editor that uses fixed-width fonts, meaning everything will line up
> > > correctly, it least in the sense that really matters.  Here's an example
> > > of what I mean:
> > >
> > >     function helloThere("hello",
> > >                                        "there"){
> > >     }
> >
> > I viewed your message with fixed-width fonts, and it came out unaligned as
> > you see above.  So I think your claim that "it will look the same on every
> > editor" is false, and it is safer to stick with spaces only.
> >
> Be that as it may, I think what I have written is correct in general.

Unfortunately, you are wrong to think that, as it is quite false.

Maybe if you rewrote it as follows it would be "correct in general":

""" Indenting with tabs can be done in such a way that it
will look correct on some editors. """

-- 
----------------------
Peter Hansen, P.Eng.
peter at engcorp.com



More information about the Python-list mailing list