rsokl / Learning_Python

Source material for Python Like You Mean it
https://www.pythonlikeyoumeanit.com/
Other
163 stars 54 forks source link

Terminology of formatting conventions #191

Open joeri-hu opened 2 years ago

joeri-hu commented 2 years ago

Referring to Module 5: Odds and Ends under the section Naming Conventions, there is a lot of emphasis put on the distinction between different formatting conventions for class names. It states that CamelCase should be used and then goes on to show the differences with the example of ShoppingList and shoppingList, implying that the latter is not CamelCase.

In this scenario, the term CamelCase is a poor choice since both styles qualify as CamelCase. Personally, I've always used the terms camelCase and PascalCase to make the distinction. The PEP8 style-guide seems to use the term mixedCase to refer to the former.

In any case, I feel that using the term CamelCase to solely refer to CapWords (and not mixedCase) is definately not the way to go and will only lead to more confusion to the reader.

rsokl commented 2 years ago

Thanks for bringing this to my attention. It does look like camelCase and CamelCase are both valid. I'll update this section to use the term CapWords instead,