What is meaning of this rule? 1.mixedCase is allowed only in contexts where that's already the prevailing style (e.g. threading.py), to retain backwards compatibility.
Asked
Active
Viewed 747 times
1 Answers
3
mixedCase is allowed only in contexts where that's already the prevailing style (e.g. threading.py), to retain backwards compatibility
It means exactly what is says. Function names should only be mixed case - like doThing
or computeAmount
if that style is already in use in the containing module, of which threading.py
is an example.
This is to cater for modules which were written before PEP8.
In any modern Python code you should use snake_case
for function and variable names.

snakecharmerb
- 47,570
- 11
- 100
- 153