Changes between Version 18 and Version 19 of Submitting/Python
- Timestamp:
- 12/27/18 13:57:04 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Submitting/Python
v18 v19 62 62 == Style == 63 63 64 Use 4-space indentation (GNU Emacs python-mode default). **Do not use tabs (tabulators) at all**. 65 Note that Python determines nesting based upon indentation, so it is quite crucial to be consistent, i.e. use given rules. 66 67 === Editor settings for 4-space indentation === 68 69 The correct editor settings for Python indentation 70 71 * Geany editor: 72 * Edit > Preferences > Editor > Intentation tab > Type: Spaces 73 * GNU Emacs: 74 * python-mode default 75 * spyder ... 76 77 === PEP8 standard Style === 78 64 79 Follow PEP8 standard and use `pep8` tool to check compliance of your code to this standard. 65 80 Note that not all code is currently compliant to complete PEP8, so we are using a custom configuration stored in `tools/pep8config.txt`, so use: … … 76 91 77 92 The best practice is to use pep8 with default configuration (i.e., without custom configuration file) for new files and new code in old files. 78 79 Use 4-space indentation (GNU Emacs python-mode default). Do not use tabs (tabulators) at all.80 Note that Python determines nesting based upon indentation, so it is quite crucial to be consistent, i.e. use given rules.81 93 82 94 Do not fix (intentionally or unintentionally) existing style issues in code (at lines) you are not changing.