Skip to content

Commit

Permalink
Merge branch 'jk/python-styles'
Browse files Browse the repository at this point in the history
* jk/python-styles:
  CodingGuidelines: add Python coding guidelines
  • Loading branch information
Junio C Hamano committed Feb 7, 2013
2 parents e7f7600 + 9ef43dd commit 41e81d2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Documentation/CodingGuidelines
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 41e81d2

Please sign in to comment.