aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/CodingGuidelines
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-02-07 14:41:31 -0800
committerJunio C Hamano <gitster@pobox.com>2013-02-07 14:41:31 -0800
commit41e81d2fb9642f0f3b9b7a278a1afab0e43f5207 (patch)
tree43a8adb382a7ba3ebd35be8ae9658945a724140b /Documentation/CodingGuidelines
parente7f7600360e65cb50b10064025e1c11293527342 (diff)
parent9ef43dd7ad3427f579285e100cc78de124213815 (diff)
downloadgit-41e81d2fb9642f0f3b9b7a278a1afab0e43f5207.tar.gz
Merge branch 'jk/python-styles'
* jk/python-styles: CodingGuidelines: add Python coding guidelines
Diffstat (limited to 'Documentation/CodingGuidelines')
-rw-r--r--Documentation/CodingGuidelines14
1 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index 1d7de5f985..9eb2d9fe7e 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -179,6 +179,20 @@ For C programs:
- Use Git's gettext wrappers to make the user interface
translatable. See "Marking strings for translation" in po/README.
+For Python scripts:
+
+ - We follow PEP-8 (http://www.python.org/dev/peps/pep-0008/).
+
+ - As a minimum, we aim to be compatible with Python 2.6 and 2.7.
+
+ - Where required libraries do not restrict us to Python 2, we try to
+ also be compatible with Python 3.1 and later.
+
+ - When you must differentiate between Unicode literals and byte string
+ literals, it is OK to use the 'b' prefix. Even though the Python
+ documentation for version 2.6 does not mention this prefix, it has
+ been supported since version 2.6.0.
+
Writing Documentation:
Every user-visible change should be reflected in the documentation.