Whitespace as syntax (was Re: Python Rocks!)
sholden at bellatlantic.net
Tue Feb 8 08:02:34 EST 2000
>From the Python Style Guide, by some guy called van Rossum ...
"Tabs or Spaces?
One indentation level is 4 spaces. Two levels is one tab. Three levels
is a tab and 4 spaces, and so on. Python doesn't mind if you indent
one line with 8 spaces and the next line with a tab -- they are
considered to have the same indentation. Replacing all tabs with
spaces is more robust in the light of some editors on the Mac or PC
(which default to displaying the tab character as 4 spaces instead of
8, as God intended) but this can be done on transfer to such
IMHO this whole thread is a prime example of Oscar Wilde's aphorism:
"The only thing you can possibly do with good advice is pass it on".
If indentation as block structure is a problem there are dozens of
other languages around. I suppose it's human nature to complain about
that we cannot change.
fcahoon at my-deja.com wrote:
[discussion of how tabs are really 8 spaces]
> I think this should be in the Python FAQ. Or is it, and I missed it
> somehow? If so, please excuse my oversight.
More information about the Python-list