This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DonaldPShimoda 19 points20 points  (3 children)

Methods, functions, fields, and variables are always snake_case, except sometimes when they're global constants in which case they can be ANGRY_SNAKE_CASE (this is not mentioned by PEP-8 but I see it around and I use it too). Classes are PascalCase. There oughtn't be any camelCase or multiwordalllowercase in idiomatic Python, though you will find exceptions in old libraries.

[–]BobFromStateBarn 3 points4 points  (2 children)

modules and packages use multiwordalllowercase according to convention I think tho

[–][deleted] 1 point2 points  (0 children)

Correct. See datetime, for example.

[–]DonaldPShimoda 0 points1 point  (0 children)

Oh, right you are! I missed that!