<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Wed, Nov 13, 2013 at 6:46 PM, Robert Collins <span dir="ltr"><<a href="mailto:robertc@robertcollins.net" target="_blank">robertc@robertcollins.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi so - in <a href="http://docs.openstack.org/developer/hacking/" target="_blank">http://docs.openstack.org/developer/hacking/</a><br>

<br>
it has as bullet point 4:<br>
Long lines should be wrapped in parentheses in preference to using a<br>
backslash for line continuation.<br>
<br>
I'm seeing in some reviews a request for () over \ even when \ is<br>
significantly clearer.<br>
<br>
I'd like us to avoid meaningless reviewer churn here: can we either:<br>
 - go with PEP8 which also prefers () but allows \ when it is better<br>
   - and reviewers need to exercise judgement when asking for one or other<br>
 - make it a hard requirement that flake8 detects<br></blockquote><div><br></div><div>+1 for the non-human approach.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<br>
My strong recommendation is to go with PEP8 and exercising of judgement.<br>
<br>
The case that made me raise this is this:<br>
    folder_exists, file_exists, file_size_in_kb, disk_extents = \<br>
        self._path_file_exists(ds_browser, folder_path, file_name)<br>
<br>
Wrapping that in brackets gets this;<br>
    folder_exists, file_exists, file_size_in_kb, disk_extents = (<br>
        self._path_file_exists(ds_browser, folder_path, file_name))<br></blockquote><div><br></div><div>The root of the problem is that it's a terribly named method with a terrible return value... fix the underlying problem.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Which is IMO harder to read - double brackets, but no function call,<br>
and no tuple: it's more ambiguous than \.<br>
<br>
from <a href="https://review.openstack.org/#/c/48544/15/nova/virt/vmwareapi/vmops.py" target="_blank">https://review.openstack.org/#/c/48544/15/nova/virt/vmwareapi/vmops.py</a><br>
<br>
Cheers,<br>
Rob<br>
<span class=""><font color="#888888">--<br>
Robert Collins <<a href="mailto:rbtcollins@hp.com">rbtcollins@hp.com</a>><br>
Distinguished Technologist<br>
HP Converged Cloud<br>
<br>
_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><br></div>-Dolph
</div></div>