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

Paul Boddie paul at
Wed Dec 5 16:50:07 CET 2001

Courageous <jkraska at> wrote in message news:<rnup0uokii7br1smadvdpolgabg0q9d83h at>...
> >If spaces should creep in Python won't compile the code.
> Spaces almost *have* to creep in, for example, on continuation
> lines. Furthermore, what you're saying isn't true. For example,
> if the person who writes it himself uses a tabstop of 8 and then
> allows spaces to creep in, things will tend to work out.

Can you give an example of how spaces must creep in on continuation
lines? Sorry, I know I should really have followed up by saying, "You
don't understand!!! You're so wrong!" But I'm interested in how other
people write their code - contrary to apparent popular belief.

> All of this, however, is academic. The defacto indentation
> standard for Python is 4 spaces.
> If you run into Python projects managed professionally, you're
> likely to find that their dejure standards are 4 spaces as well,
> and with these, you'll find that in order to not get their tech
> leads really pissed at you, you'll be learning what a soft tab
> stop is, and setting it to 4.

Many of us haven't been lucky enough to encounter commercial Python
projects, but if that's what you mean by "professional" then I'll take
your word for it. I am aware that there's a lot of hostility to tab
usage in various open source projects, but that's really a consequence
of the tools around on many platforms today. I suppose that most
people just go along with whatever has been decided, though, and
that's why the tab/space handling tools need a lot more blatant
publicity - a best practice section on would be nice...


More information about the Python-list mailing list