Naming of modules, classes, methods and variables in python #16
Locked
AndrewSazonov
announced in
ADRs
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
For code consistency use PEP-8 style where the most important conventions are:
Module
Name should always be snake_small_caps (file tree)
root_folder.first_folderdandy_fineand minusnever-ever. Python will give strange errorsClass
Name should be CamelCase for the individual words.
BestClassEverIf acronym is part of the name it should be ALLCAPS
SWATCodeIsTheBestMethods and variables
Public methods and variables should be snake_small_caps.
Private methods and variables should have a leading underscore _private_method
Assume we have initialized an object of the
MyClass:Links to the original discussions: #13
All reactions