2

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.

1

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.