[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GOP-PROP 1a: python formatting
From: |
Graham Percival |
Subject: |
GOP-PROP 1a: python formatting |
Date: |
Mon, 6 Jun 2011 11:05:42 +0100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
We are no longer going to rush this item; the schedule has been
adjusted accordingly:
http://lilypond.org/~graham/gop/index.html
Corrected proposal, copied from:
http://lilypond.org/~graham/gop/gop_1.html
Proposal: let’s follow the indentation described in PEP-8.
http://www.python.org/dev/peps/pep-0008/
* use 4 spaces per indentation level
* never mix tabs and spaces (for indentation)
* Code indented with a mixture of tabs and spaces should be
converted to using spaces exclusively
There should be absolutely no tab characters for indentation in
any .py file in lilypond git. All such files should be converted
to use spaces only. You can see such files with
address@hidden:~/src/lilypond$ git grep -l $'\t' -- "*.py"
python/convertrules.py
python/fontextract.py
python/lilylib.py
python/musicxml.py
python/rational.py
scripts/auxiliar/makelsr.py
scripts/build/create-weblinks-itexi.py
scripts/build/website_post.py
scripts/musicxml2ly.py
Rationale: mixing indentation styles is not a great idea, and in
my experience of python code documentation and examples online,
the 4-space indent rule from PEP-8 is almost universally followed.
Cheers,
- Graham
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- GOP-PROP 1a: python formatting,
Graham Percival <=