Tabs versus Spaces in Source Code

ashesh ashesh1707 at gmail.com
Thu May 18 01:45:27 EDT 2006


If I work on your project, I follow the coding and style standards you
specify.


Likewise if you  work on my project you follow the established
standards.


Fortunately for you, I am fairly liberal on such matters.


I like to see 4 spaces for indentation.  If you use tabs, that's what I

will see, and you're very likely to have your code reformatted by the
automated build process, when the standard copyright header is pasted
and missing javadoc tags are generated as warnings.


I like the open brace to start on the line of the control keyword.  I
can deal with the open brace being on the next line, at the same level
of indentation as the control keyword.  I don't quite understand the
motivation behind the GNU style, where the brace itself is treated as a

half-indent, but I can live with it on *your* project.


Any whitespace or other style that isn't happy to be reformatted
automatically is an error anyway.


I'd be very laissez-faire about it except for the fact that code
repositories are much easier to manage if everything is formatted
before
it goes in, or as a compromise, as a step at release tags. 


Ashesh..




More information about the Python-list mailing list