Python lower_case_with_underscores style convention: underscores not popular?
Posted
by
squirrel
on Programmers
See other posts from Programmers
or by squirrel
Published on 2011-02-22T09:55:21Z
Indexed on
2011/02/22
15:33 UTC
Read the original article
Hit count: 261
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.)
© Programmers or respective owner