One general comment: Right now, we have all sorts of indentation in .py
files (mainly two spaces, four spaces, and tabs).

Tab and spaces have their own advantages and disadvantages, mixing
them usually make things worse, especially for python code when spaces
and tabs are significant. For example, if you have

four spacesb=2
\ta=1

python will yell and one can not always identify the problem easily.
Because different editors have different rules regarding auto-indent
(usually use tab), tab-expand-to-space etc, my final decision was
using all spaces and expand all tabs. I use spaces because I do not
like the fact that I may have to adjust an editor (sometimes I can
not) to make my source code looks the same. I use two spaces since I
can wrap lines less often to keep lines within 75-80 characters.

I agree that if we are careful enough, the C++ rules will just work
(Andre has pointed that out as well), but I do suggest that we use all
spaces for python code.

If my words do not count, Guido van Rossum recommended 4 spaces. See
http://www.python.org/dev/peps/pep-0008/ Note that I follow most of
the rules there.

Bo

Reply via email to