[RFC] Indentation / import rules

Robey Pointer robey at lag.net
Mon Jul 24 19:48:17 BST 2006


On 24 Jul 2006, at 8:07, John Arbash Meinel wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Aaron Bentley wrote:
>>
>> I'm not sure I agree with that.  Although PEP8 describes imports, it
>> also describes long-line handling:
>>
>> The preferred way of wrapping long lines is by using Python's implied
>> line continuation inside parentheses, brackets and braces.
>>
>> The examples it gives would favour:
>>
>> from bzrlib import (bar, foo, baz,
>>                     llllllllllllllllong,
>>                     short)

That's the only one that doesn't look ugly to me.


> Sure, but this conflicts with our desire to have good merging. PEP8
> recommends adding multiple entries per line, but alphabetical sorting,
> combined with one entry per line prevents conflicts.

Do we really want to write bad code just to work around deficiencies  
in merging algorithms?  IMHO the code should be clear and simple  
first, then we can worry about bogus conflicts later.

I suspect anyone looking at that kind of conflict will immediately  
understand the issue and be able to fix it.  Code that's formatted  
for computers instead of humans will be around causing pain for a  
much longer time.

robey





More information about the bazaar mailing list