[Dev] Coding Guidelines

Katie Capps Parlante capps at osafoundation.org
Fri Nov 19 11:43:52 PST 2004


Early in the project we made these decisions/agreements about coding 
guidelines:

(1) We would follow Python coding guidelines unless we had a compelling 
reason not to.

(2) In general, we would follow the coding guidelines of any project we 
were working with. We recognized that this would lead to some 
inconsistencies (wxPython/wxWidgets has different naming conventions 
from Python, for example), and that it would be ok to be consistent by 
module.

(3) We wouldn't be super sticklers about all coding guidelines, only 
ones we thought were particularly important. We recognized that folks 
came from different projects with different habits, and decided that as 
long as any particular module was consistent, that was good enough for a 
bunch of formatting decisions.

The gist of the decisions valued getting on with the project over 
spending a lot of time arguing about coding conventions. :)

I would have thought that the space-before-paren-after-method-name issue 
would have fallen under #3, although I would concede the argument that a 
consistent approach makes it easier to grep. At any rate, if we decide 
its important to be consistent, then surely #1 would suggest we go with 
the no-space option.

Cheers,
Katie


Ted Leung wrote:
> And most other Python code is formatted this way.  +1 for paren 
> immediately after the function name.
> 
> Ted
> 
> On Nov 19, 2004, at 9:37 AM, Bryan Stearns wrote:
> 
>> Guido prefers the paren immediately following the function name:
>> http://www.python.org/doc/essays/styleguide.html. (So do I, but I 
>> think his
>> +1 means more than mine in this case.)
>>
>> ...Bryan
>>


More information about the Dev mailing list