Python PEP8 Naming
Posted: Wed Nov 04, 2015 3:24 pm
I have a hard time following the Python PEP 8 when it comes to the naming convention:
str.startswith()
file.readlines()
etc..
I like to use camelCase for my function names, and I see no issue with others using lower_case, but I fail to understand how PEP8 can require us to use 'lower_case' when python itself uses 'lowercase' (no underscore) in many situations.
Just rambling,
Trevor
Yet we see countless times in python where they break their own guild lines:Function names should be lowercase, with words separated by underscores as necessary to improve readability.
mixedCase is allowed only in contexts where that's already the prevailing style (e.g. threading.py), to retain backwards compatibility.
str.startswith()
file.readlines()
etc..
I like to use camelCase for my function names, and I see no issue with others using lower_case, but I fail to understand how PEP8 can require us to use 'lower_case' when python itself uses 'lowercase' (no underscore) in many situations.
Just rambling,
Trevor