Python lower_case_with_underscores style convention: underscores not popular?
- by squirrel
PEP8 recommends using
lowercase, with words separated by
underscores as necessary to improve
readability
for variable and function names. I've seen this interpreted as lower_case_with_underscores by most people, although in practice and in Python's native methods it seems like lowercasewithoutunderscores is more popular.
It seems like following PEP8 strictly would be awkward since it seems to suggest mixing both lower_case_with_underscores and lowercasewithoutunderscores, which would be inconsistent.
What is your interpretation of PEP8's variable names, and what do you actually use in practice?
(Personally, I like lowerCamelCase as a compromise between readability and ease of typing.)