User Tools

Site Tools


programming:python

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

programming:python [2018/09/03 17:25] (current)
Line 1: Line 1:
 +====== Python ======
  
 +===== Formatting =====
 +
 +==== PEP 8 ====
 +
 +PEP 8 is the coding style adhered to by python developers for the python binaries and standard library code. You can read the guide in its [[https://​www.python.org/​dev/​peps/​pep-0008/​ | entirety]] or a [[https://​robinwinslow.uk/​2014/​01/​05/​summary-of-python-code-style-conventions/​ | helpful summary]] with examples. ​
 +
 +Main Highlights: ​
 +  * [[https://​www.python.org/​dev/​peps/​pep-0008/#​tabs-or-spaces | 4 spaces]]((Tabs = sin)) per [[https://​www.python.org/​dev/​peps/​pep-0008/#​indentation | indentation level]]
 +
 +The [[https://​github.com/​pbrod/​autopep8 | autopep8]] package "​automatically formats Python code to conform to the PEP 8 style guide"​.
 +
 +=== Atom ===
 + 
 +  * Setting/ Preferences > Packages > Search "​language-python"​ > Settings > Python Grammar > Tab Length > Set to "​4"​
 +
 +  * Setting/ Preferences > Editor > Tab Type > Set to "​Soft"​
programming/python.txt ยท Last modified: 2018/09/03 17:25 (external edit)