summaryrefslogtreecommitdiffstats
path: root/share/extensions/STYLEGUIDE.md
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--share/extensions/STYLEGUIDE.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/share/extensions/STYLEGUIDE.md b/share/extensions/STYLEGUIDE.md
new file mode 100644
index 0000000..f3bd501
--- /dev/null
+++ b/share/extensions/STYLEGUIDE.md
@@ -0,0 +1,15 @@
+1. Follow PEP8
+2. For Python 2 specific code use `if sys.version_info[0] == 2:` and include a Python3 alternative in the else clause.
+
+
+ For example:
+
+```python
+if sys.version_info[0] == 2:
+ import urllib
+ import urlparse
+else:
+ import urllib.request as urllib
+ import urllib.parse as urlparse
+```
+