Re: GOP-PROP 1: python formatting - probable decision

2011-06-30 Thread Graham Percival
On Thu, Jun 30, 2011 at 02:59:10PM +0100, Phil Holmes wrote: > "use 4 spaces per indentation level" > "a text editor could be used to replace \t with 8 spaces" > > Unless we have only ever used tabs to represent double indents, this > isn't self consistent. That is exactly what happened. - python

Re: GOP-PROP 1: python formatting - probable decision

2011-06-30 Thread Phil Holmes
- Original Message - From: "Graham Percival" To: Sent: Wednesday, June 15, 2011 12:11 AM Subject: GOP-PROP 1: python formatting - probable decision Unless anybody has a compelling reason against it, this is the proposal which will be adopted on 22 June 2011: http://li

RE: GOP-PROP 1: python formatting (accepted)

2011-06-23 Thread James Lowe
1: python formatting (accepted) We have now accepted the final version of GOP-PROP 1. The unofficial page will remain online for the duration of GOP: http://lilypond.org/~graham/gop/gop_1.html but the offical version is now in the CG and was pushed as bde5d50a10ab68e864c161fb98478c3803b6d409

RE: GOP-PROP 1: python formatting (accepted)

2011-06-23 Thread James Lowe
Hello, From: lilypond-devel-bounces+james.lowe=datacore@gnu.org [lilypond-devel-bounces+james.lowe=datacore@gnu.org] on behalf of Graham Percival [gra...@percival-music.ca] Sent: 23 June 2011 23:48 To: lilypond-devel@gnu.org Subject: GOP-PROP 1

GOP-PROP 1: python formatting (accepted)

2011-06-23 Thread Graham Percival
We have now accepted the final version of GOP-PROP 1. The unofficial page will remain online for the duration of GOP: http://lilypond.org/~graham/gop/gop_1.html but the offical version is now in the CG and was pushed as bde5d50a10ab68e864c161fb98478c3803b6d409 Are there any volunteers to do t

Re: GOP-PROP 1: python formatting - probable decision

2011-06-15 Thread Graham Percival
On Wed, Jun 15, 2011 at 02:16:37PM +0100, Phil Holmes wrote: > I've not waded through the make output yet, so I don't know exactly > what happens during it. It's only 36,000 lines long, so barely a > challenge. I do know that some of the python scripts are put into > the build tree by linking to

Re: GOP-PROP 1: python formatting - probable decision

2011-06-15 Thread Phil Holmes
- Original Message - From: "Graham Percival" To: "Phil Holmes" Cc: Sent: Wednesday, June 15, 2011 2:02 PM Subject: Re: GOP-PROP 1: python formatting - probable decision On Wed, Jun 15, 2011 at 01:49:22PM +0100, Phil Holmes wrote: - Original Message - Fr

Re: GOP-PROP 1: python formatting - probable decision

2011-06-15 Thread Graham Percival
On Wed, Jun 15, 2011 at 01:49:22PM +0100, Phil Holmes wrote: > - Original Message - From: "Graham Percival" > > >After the initial tab-fixes (in at most 9 files), we'll use > >python -tt for the build process, so no mistakes will creep in. > > Doesn't this assume that the doc build is act

Re: GOP-PROP 1: python formatting - probable decision

2011-06-15 Thread Phil Holmes
- Original Message - From: "Graham Percival" After the initial tab-fixes (in at most 9 files), we'll use python -tt for the build process, so no mistakes will creep in. Doesn't this assume that the doc build is actually checked for errors? -- Phil Holmes __

Re: GOP-PROP 1: python formatting - probable decision

2011-06-15 Thread Graham Percival
On Wed, Jun 15, 2011 at 11:46:01AM +0200, Matthias Kilian wrote: > On Wed, Jun 15, 2011 at 12:11:37AM +0100, Graham Percival wrote: > > 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. > > I

Re: GOP-PROP 1: python formatting - probable decision

2011-06-15 Thread Matthias Kilian
On Wed, Jun 15, 2011 at 12:11:37AM +0100, Graham Percival wrote: > 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. I'd go a step further and recommend (for python files) that no tabs are used a

Re: GOP-PROP 1: python formatting - probable decision

2011-06-15 Thread Martin Tarenskeen
On Wed, 15 Jun 2011, Federico Bruni wrote: How can I change this behaviour, so that automatically 4-space indentation is used. Can/should I change something in my .vimrc file http://stackoverflow.com/questions/234564/tab-key-4-spaces-and-auto-indent -after-curly-braces-in-vim http://vim.wik

Re: GOP-PROP 1: python formatting - probable decision

2011-06-15 Thread Federico Bruni
2011/6/15 Martin Tarenskeen > > > On Wed, 15 Jun 2011, Graham Percival wrote: > > 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. >> Implementation notes

Re: GOP-PROP 1: python formatting - probable decision

2011-06-14 Thread Werner LEMBERG
> We have very few (or none) patches for python files, so a large > whitespace change should not break any pending patches. And even if we have: It's straightforward to change tabs to spaces even in diff files since such an operation doesn't change the number of lines. Werner __

Re: GOP-PROP 1: python formatting - probable decision

2011-06-14 Thread Martin Tarenskeen
On Wed, 15 Jun 2011, Graham Percival wrote: 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. Implementation notes Not that I contribute much python code to

GOP-PROP 1: python formatting - probable decision

2011-06-14 Thread Graham Percival
Unless anybody has a compelling reason against it, this is the proposal which will be adopted on 22 June 2011: http://lilypond.org/~graham/gop/gop_1.html GOP 1 - python formatting Proposal summary let’s follow the indentation described in PEP-8. http://www.python.org/dev/peps/pep-0008/ * use

Re: GOP-PROP 1: python formatting

2011-06-10 Thread Jan Warchoł
2011/6/6 Graham Percival > > On Mon, Jun 06, 2011 at 11:11:00AM +0200, Jan Warchoł wrote: > > 2011/6/6 Graham Percival > > > > > > Proposal: let’s follow PEP-8. > > > http://www.python.org/dev/peps/pep-0008/ > > > > > >    * use 4 spaces per indentation level > > >    * never max tabs and spaces

Re: GOP-PROP 1: python formatting

2011-06-06 Thread Benjamin Peterson
Graham Percival percival-music.ca> writes: > I am not aware of any pretty printers for python code -- remember > that unlike C++ or scheme, indentation in python is the way that > one indicates code blocks. (this makes mixing tabs and spaces > particularly horrible!) This is a useful tool for fi

Re: GOP-PROP 1: python formatting

2011-06-06 Thread Martin Tarenskeen
that unlike C++ or scheme, indentation in python is the way that one indicates code blocks. (this makes mixing tabs and spaces particularly horrible!) Recently I tried to convert some python 2.7 code that I wrote for a little personal project to python 3.2 using the 2to3 tool. Then I disc

Re: GOP-PROP 1: python formatting

2011-06-06 Thread Graham Percival
On Mon, Jun 06, 2011 at 11:11:00AM +0200, Jan Warchoł wrote: > 2011/6/6 Graham Percival > > > > Proposal: let’s follow PEP-8. > > http://www.python.org/dev/peps/pep-0008/ > > > >    * use 4 spaces per indentation level > >    * never max tabs and spaces > >    * Code indented with a mixture of tab

Re: GOP-PROP 1: python formatting

2011-06-06 Thread Graham Percival
On Mon, Jun 06, 2011 at 06:10:30AM +0200, Werner LEMBERG wrote: > Just curious: Is there any python code in lilypond which doesn't > intentionally follow this rule? Yes; git grep -l $'\t' -- "*.py" That command doesn't guarantee that the tabs are used in indentation (so it might give some false

Re: GOP-PROP 1: python formatting

2011-06-06 Thread Graham Percival
On Mon, Jun 06, 2011 at 01:41:07PM +0200, Karl Hammar wrote: > Graham: > > > I am not aware of any pretty printers for python code -- remember > > A quick search did not turn up anything useful either, well, sorry > for that then. Not at all; thanks for looking! I should have stated this explic

Re: GOP-PROP 1: python formatting

2011-06-06 Thread Karl Hammar
Graham: > On Mon, Jun 06, 2011 at 10:58:11AM +0200, Karl Hammar wrote: > > Graham: > > > (this proposal will be rushed because nobody will argue against > > > it. Initial discussion 6 June, summary and tentative decision 8 > > > June, implementation 10 June) > > Having set a policy about policy dis

Re: GOP-PROP 1: python formatting

2011-06-06 Thread Graham Percival
On Mon, Jun 06, 2011 at 10:58:11AM +0200, Karl Hammar wrote: > Graham: > > (this proposal will be rushed because nobody will argue against > > it. Initial discussion 6 June, summary and tentative decision 8 > > June, implementation 10 June) > > Having set a policy about policy discussions and then

Re: GOP-PROP 1: python formatting

2011-06-06 Thread Jan Warchoł
2011/6/6 Graham Percival > > Proposal: let’s follow PEP-8. > http://www.python.org/dev/peps/pep-0008/ > >    * use 4 spaces per indentation level >    * never max tabs and spaces >    * Code indented with a mixture of tabs and spaces should be >      converted to using spaces exclusively Do you s

Re: GOP-PROP 1: python formatting

2011-06-06 Thread Karl Hammar
Graham: > (this proposal will be rushed because nobody will argue against > it. Initial discussion 6 June, summary and tentative decision 8 > June, implementation 10 June) Having set a policy about policy discussions and then breaking it the first thing you do is not a good policy. If there is no

Re: GOP-PROP 1: python formatting

2011-06-06 Thread Trevor Daniels
Graham Percival wrote Monday, June 06, 2011 12:01 AM Proposal: let’s follow PEP-8. http://www.python.org/dev/peps/pep-0008/ * use 4 spaces per indentation level * never max tabs and spaces * Code indented with a mixture of tabs and spaces should be converted to using spaces exclu

Re: GOP-PROP 1: python formatting

2011-06-05 Thread Patrick McCarty
On Sun, Jun 5, 2011 at 4:01 PM, Graham Percival wrote: > > Proposal: let’s follow PEP-8. > http://www.python.org/dev/peps/pep-0008/ > >    * use 4 spaces per indentation level >    * never max tabs and spaces >    * Code indented with a mixture of tabs and spaces should be >      converted to usin

Re: GOP-PROP 1: python formatting

2011-06-05 Thread Ian Hulin
On 06/06/11 00:01, Graham Percival wrote: > Proposal website: > http://lilypond.org/~graham/gop/gop_1.html > > > (this proposal will be rushed because nobody will argue against > it. Initial discussion 6 June, summary and tentative decision 8 > June, implementation 10 June) > > Proposal: let’s f

Re: GOP-PROP 1: python formatting

2011-06-05 Thread Martin Tarenskeen
On Mon, 6 Jun 2011, Graham Percival wrote: * never max tabs and spaces max = mix ? -- MT ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel

Re: GOP-PROP 1: python formatting

2011-06-05 Thread Werner LEMBERG
> Proposal: let’s follow PEP-8. > http://www.python.org/dev/peps/pep-0008/ > > * use 4 spaces per indentation level I prefer 2 spaces (this allows for longer lines while staying in the 80 char line length limit), but since all python code already uses 4 spaces, this is OK with me. Just curio

Re: GOP-PROP 1: python formatting

2011-06-05 Thread Graham Percival
On Sun, Jun 05, 2011 at 07:42:56PM -0400, Michael Welsh Duggan wrote: > Graham Percival writes: > > > * Code indented with a mixture of tabs and spaces should be > > converted to using spaces exclusively > > For the purposes of consistency (both within Lilypond's sources, and > within

Re: GOP-PROP 1: python formatting

2011-06-05 Thread Michael Welsh Duggan
Graham Percival writes: > Proposal website: > http://lilypond.org/~graham/gop/gop_1.html > > > (this proposal will be rushed because nobody will argue against > it. Initial discussion 6 June, summary and tentative decision 8 > June, implementation 10 June) > > Proposal: let’s follow PEP-8. > http

GOP-PROP 1: python formatting

2011-06-05 Thread Graham Percival
Proposal website: http://lilypond.org/~graham/gop/gop_1.html (this proposal will be rushed because nobody will argue against it. Initial discussion 6 June, summary and tentative decision 8 June, implementation 10 June) Proposal: let’s follow PEP-8. http://www.python.org/dev/peps/pep-0008/ *