- Use python dictionaries when storing data.
- INDENTATION, INDENTATION, INDENTATION.
- Be knowledgable how your environment is set up whether using spaces or tabs. Keep it consistant and also be aware of which version you are using since they will interpret them differently. Example, Python 2 converts tabs as if they were 8-space tabs. Python 3 will just refuse to compile a file that contains a mixture of the two.
- Naming convention is key. (I like PEP 8)
- Name functions, variables... so they have meaning in your code.
- Variables, functions, methods, packages, module
lower_case_with_underscores
- Classes and Exceptions
CapWords
- Protected methods and internal functions
_single_leading_underscore(self, ...)
- Private Methods
__double_leading_underscore(self, ...)
- Constants
ALL_CAPS_WITH_UNDERSCORES
- Put all imports at top of your code.
- Put comments in your code so you can come back to it later.
- Use functions when at all possible.
- Each function should only do one job.
- Use to modulize your code.
- Should take no more than 3 parameters.
- Modules
from modu import blah
- Testing, testing, testing.
- Write tests to make sure your application is working properly.
Last active
January 2, 2018 23:09
-
-
Save tylernchls/c567ba207510ac9711740879ee7db338 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment