Skip to content
ChrisOelmueller edited this page Feb 16, 2013 · 3 revisions

This page contains different style guides for the languages we use.

Python

PEP8 by Guido van Rossum is a good style guide: http://www.python.org/dev/peps/pep-0008/

We handle some things differently though:

  • Tabs only, no spaces.
  • Line length: We don't comply strictly with the 79 characters. Usually we try to stay around 90 columns per line.

When dealing with strings, please use [PEP-3101] (http://www.python.org/dev/peps/pep-3101/) preferred '{foo}'.format(foo=foo) syntax instead of the binary '%s' % foo operator. [Nice examples on {foo}.format usage] (http://svn.python.org/view/sandbox/trunk/pep3101/doctests/basic_examples.txt?revision=54966&view=markup)

Clone this wiki locally