summaryrefslogtreecommitdiffstats
path: root/share/extensions/STYLEGUIDE.md
blob: f3bd501963271364bbd9191e56babb1581ef5e78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
```