[openstack-dev] [style] () vs \ continuations

Chris Behrens cbehrens at codestud.com
Thu Nov 14 02:28:03 UTC 2013


For this example, I'd look at using parens on the left side to see if that helps.  I also, like Sean, really dislike the look of \.

> On Nov 13, 2013, at 5:08 PM, Robert Collins <robertc at robertcollins.net> wrote:
> 
>> On 14 November 2013 13:59, Sean Dague <sean at dague.net> wrote:
>> 
>> This is an area where we actually have consensus in our docs (have had
>> for a while), the reviewer was being consistent with them, and it feels
>> like you are reopening that for personal preference.
> 
> Sorry that it feels that way. My personal code also uses ()
> overwhelmingly - so this isn't a personal agenda issue. I brought it
> up because the person that wrote the code had chosen to use \, and as
> far as I knew we didn't have a hard decision either way - and the
> style guide we have talks preference not requirement, but the review
> didn't distinguish between whether it's a suggestion or a requirement.
> I'm seeking clarity so I can review more effectively and so that our
> code doesn't end up consistent but hard to read.
> 
>> Honestly I find \ at the end of a line ugly as sin, and completely
>> jarring to read. I actually do like the second one better. I don't care
>> enough to change a policy on it, but we do already have a policy, so it
>> seems pretty pedantic, and not useful.
> 
> Ok, thats interesting. Readability matters, and if most folk find that
> even this case - which is pretty much the one case where I would argue
> for \ - is still easier to read with (), then thats cool.
> 
>> Bringing up for debate the style guide every time it disagrees with your
>> personal preference isn't a very effective use of people's time.
>> Especially on settled matters.
> 
> Totally not what I'm doing. I've been told that much of our style
> guide was copied lock stock and barrel from some Google Python style
> guide, so I can't tell what is consensus and what is 'what someone
> copied down one day'. Particularly when there is no rationale included
> against the point - its a black box and entirely opaque.
> 
> -Rob
> 
> -- 
> Robert Collins <rbtcollins at hp.com>
> Distinguished Technologist
> HP Converged Cloud
> 
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list