Naming conventions for regular variables

mk mrkafk at gmail.com
Fri Jul 4 06:59:22 EDT 2008


http://www.python.org/dev/peps/pep-0008/

"Function Names

Function names should be lowercase, with words separated by underscores 
       as necessary to improve readability."

However, this PEP does not recommend any particular style for naming 
regular (local) variables.

Personally I like "mixedCase", however using both styles looks a bit weird:

def some_function_name(someVariableName, anotherVar)

Naming both functions and variables using "lowercase with underscore 
separator between words for readability" leads to confusing function 
names with variable names - and distinguishing between variables and 
function names just by looking at them would be nice.

Recommendations?








More information about the Python-list mailing list