[style, code, python, best practices, guidelines]
Python coding style guidelines
We follow Python’s style guide PEP 8. Also we:
- Use docstrings for functions whose purpose may be unclear or that will be used outside of their own modules
When opening text files for writing or appending text, use
mode = "wb" or
mode = "ab" respectively to write in binary mode. This improves portability across operating systems.
When opening text files for reading, use
mode = "rU" to enable universal newline support.