<div dir="ltr">I find the operator at the beginning of the line much more clear in code like this:<div><br></div><div><font face="monospace, monospace">innerWidth = (</font><span style="font-family:monospace,monospace">outerWidth</span></div><div><span style="font-family:monospace,monospace">              - 2 * border_width</span></div><div><span style="font-family:monospace,monospace">              - left_margin</span></div><div><span style="font-family:monospace,monospace">              - right_margin)</span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace">outerHeight  = (</span><span style="font-family:monospace,monospace">innerHeight</span></div><div><span style="font-family:monospace,monospace">                + (title_height if have_title else 0)</span></div><div><span style="font-family:monospace,monospace">                + (subtitle_height if have_subtitle else 0)</span></div><div><span style="font-family:monospace,monospace">                - (1 if </span><span style="font-family:monospace,monospace">have_title and </span><span style="font-family:monospace,monospace">have_subtitle else 0))</span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><div><span style="font-family:monospace,monospace">outerHeight  = (</span><span style="font-family:monospace,monospace">innerHeight</span></div><div><span style="font-family:monospace,monospace">                + (title_height</span></div><div><span style="font-family:monospace,monospace">                   if have_title</span></div><div><span style="font-family:monospace,monospace">                   else 0)</span></div><div><span style="font-family:monospace,monospace">                + (subtitle_height</span></div><div><span style="font-family:monospace,monospace">                   if have_subtitle</span></div><div><span style="font-family:monospace,monospace">                  </span><span style="font-family:monospace,monospace"> else 0)</span></div><div><span style="font-family:monospace,monospace">                - (1</span></div><div><font face="monospace, monospace">                   </font><span style="font-family:monospace,monospace">if </span><span style="font-family:monospace,monospace">have_title and </span><font face="monospace, monospace">have_subtitle<br></font><font face="monospace, monospace">                   </font><span style="font-family:monospace,monospace">else 0))</span></div></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace">area = ((multiline_calculation_of_height)</span></div><div><span style="font-family:monospace,monospace">        * (</span><span style="font-family:monospace,monospace">multiline_calculation_of_width</span><span style="font-family:monospace,monospace">))</span></div><div><br></div><div>The first two are taken and sanitized from real code.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font face="arial, helvetica, sans-serif">--- Bruce<br></font><div><div><font face="arial, helvetica, sans-serif">Check out my puzzle book and g</font><span style="font-family:arial,helvetica,sans-serif;font-size:12.8px">et it free here:</span></div><div><a href="http://J.mp/ingToConclusionsFree" style="font-family:arial,helvetica,sans-serif;font-size:12.8px" target="_blank">http://J.mp/ingToConclusionsFree</a><span style="font-family:arial,helvetica,sans-serif;font-size:12.8px"> (available on iOS)</span></div></div><div><br></div><div><br></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Thu, Apr 14, 2016 at 11:48 AM, SW <span dir="ltr"><<a href="mailto:walker_s@hotmail.co.uk" target="_blank">walker_s@hotmail.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">That'll teach me for stepping away from the computer...<br>
<br>
As for changing an established rule, I agree that can be difficult. The<br>
reason this one became an irritation for me is that it was only in the<br>
last few months that I saw flake8 (my style complainer of choice) start<br>
complaining about this, so it's not quite so entrenched as other<br>
elements of style.<br>
<br>
I agree that placing the binary operator at the end shows the line<br>
should continue, and thus could be valid, but I also think that placing<br>
it at the start of the next line shows the logic flow for each part of<br>
the expression more clearly- as shown in the examples I originally gave.<br>
<br>
Thanks,<br>
S<br>
<div class="HOEnZb"><div class="h5"><br>
On 14/04/16 18:23, Guido van Rossum wrote:<br>
> Thanks, that was obviously an oversight. I've fixed the PEP.<br>
><br>
> If the discussion ends up with rough consensus on changing this I will<br>
> happily change it back (and change all other occurrences to match the<br>
> new rule).<br>
><br>
> Note that my request for "rough consensus" does *not* imply a vote. +1<br>
> and -1 votes (nor fractions in between) should not be posted --<br>
> however cogent arguments for/against the status quo (or for<br>
> relinquishing the rule altogether) are welcome.<br>
><br>
> On Thu, Apr 14, 2016 at 10:02 AM, Matthias welp <<a href="mailto:boekewurm@gmail.com">boekewurm@gmail.com</a>> wrote:<br>
>>> Where in PEP 8 does it violate its own advice<br>
>> As the OP did not reply this fast, from the webpage (/dev/peps/pep-0008)<br>
>><br>
>> section indentation, just after 'Acceptable options in this situation<br>
>> include, but are not limited to: '<br>
>><br>
>> # Add some extra indentation on the conditional continuation line.<br>
>> if (this_is_one_thing<br>
>>         and that_is_another_thing):<br>
>>     do_something()<br>
>><br>
>> That is the only place I could find just now.<br>
>><br>
>><br>
>> _______________________________________________<br>
>> Python-ideas mailing list<br>
>> <a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
>> <a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
>> Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
><br>
><br>
<br>
<br>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</div></div></blockquote></div><br></div>