CodingStyle: recommend PEP 8 for Python code
authorRussell Bryant <rbryant@redhat.com>
Thu, 19 Feb 2015 18:03:53 +0000 (13:03 -0500)
committerBen Pfaff <blp@nicira.com>
Thu, 19 Feb 2015 18:10:42 +0000 (10:10 -0800)
Add a new section about Python code to the coding style document.
Suggest that all new Python code should adhere to the PEP 8 standard.
Also include a reference to tools that can quickly check code for
style issues.

Signed-off-by: Russell Bryant <rbryant@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
AUTHORS
CodingStyle.md

diff --git a/AUTHORS b/AUTHORS
index 5fa9598..de81461 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -139,6 +139,7 @@ Rob Adams               readams@readams.net
 Robert Ã…kerblom-Andersson Robert.nr1@gmail.com
 Rob Hoes                rob.hoes@citrix.com
 Romain Lenglet          romain.lenglet@berabera.info
+Russell Bryant          rbryant@redhat.com
 Ryan Wilson             wryan@nicira.com
 Sajjad Lateef           slateef@nicira.com
 Samuel Ghinet           sghinet@cloudbasesolutions.com
index 77b1572..0a441e0 100644 (file)
@@ -569,3 +569,10 @@ for other compilers.  You can, however, use C99 features or GCC
 extensions also supported by Clang in code that compiles only on
 GNU/Linux (such as lib/netdev-linux.c), because GCC is the system
 compiler there.
+
+## PYTHON
+
+When introducing new Python code, try to follow Python's
+[PEP 8](http://www.python.org/dev/peps/pep-0008/) style.
+Consider running the `pep8` or `flake8` tool against your
+code to find issues.