-
Book Overview & Buying
-
Table Of Contents
Mastering Python Scientific Computing
By :
This section discusses some general best practices that should be followed by Python programmers:
The PEP 0008 style guide for Python code: The first best practice in this category is to clearly understand and follow PEP 0008. Refer to https://www.python.org/dev/peps/pep-0008/.
Naming convention: It is recommended to all coders that they follow a consistent and meaningful naming convention. This recommendation is helpful, not only to the original developers, but also to future developers who may work to enhance the system. Uniform and meaningful names improve the readability of code. The naming convention should follow a uniform naming scheme and adopt the recommended scheme for the specific language under use, for example, the use of underscores or camel case to join multiple words in a variable or function name. The following table represents the recommended names and the not-recommended names:
|
Not recommended |
Recommended |
|---|---|
|
Variables: var1, var2, mycalculation... |
Change the font size
Change margin width
Change background colour