← Back to team overview

launchpad-dev team mailing list archive

Re: RFC: format lists one-per line ?

 

On Monday 02 August 2010 10:17:05 Gavin Panella wrote:
> On 2 August 2010 06:06, Robert Collins <robert.collins@xxxxxxxxxxxxx> wrote:
> > Have a look at
> > https://code.edge.launchpad.net/~wgrant/launchpad/per-archive-build-debu
> > g-symbols/+merge/29671
> > 
> > Look at the reflowed lists - pretty hard to tell whats going on.
> > 
> > In bzr, we format lists like that as follows:
> > 
> > foo = [
> >    'bar',
> >    'gam',
> >    'quux',
> >    ]
> > 
> > This makes the diff /really easy/ to read.
> > 
> > Any objections to this change?
> 
> I thought this was already the standard, with only import lists
> getting re-flowed. I've been coding to this.

https://dev.launchpad.net/PythonStyleGuide#Whitespace%20and%20Wrapping

https://dev.launchpad.net/PythonStyleGuide#Multiline%20imports

"Our style guide for multiline import statements differs from our general 
guideline for multiline braces, as a compromise to keep our import sections to 
a reasonable size."



Follow ups

References