coding conventions, PEP vs. practice

Roy Smith roy at panix.com
Tue Jan 4 20:06:56 EST 2005


Roman Roelofsen <r.roelofsen at tuxed.de> wrote:
> These frameworks are using "mixedCase" but PEP8 suggests 
> "lower_case_with_underscores" except "in contexts where that's already the 
> prevailing style" which is not the case here IMHO.
> 
> So, are there any specific reasons for breaking the rules here? I think 
> consistent conventions are very important. Being a Java developer in the last 
> couple of years, i learned how practical it can be to have only one naming 
> style. 

My personal preference is camelCase over words_with_underscores, but 
fundamentally, this is a bit of a religious issue.  Pick a style, and go 
with it.

If you're working on existing code, go with the prevailing style.  If 
you're working in a group, pick a common style and go with the group 
decision.  Of all the software engineering issues to worry about, this 
is pretty low on the list.



More information about the Python-list mailing list