<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">My preference has been towards having the binary operator at the front rather than end since listening to Brandon Rhodes 2012 PyCon Canada talk (specifically starting around [1]) . Specifically he is arguing that following Knuth rather than PEP 8 [2] might be a better way to go.<div class=""><br class=""></div><div class="">Maybe my preference there is due to the Django work I was doing where I would get long query lines and didn’t always want to split them into multiple lines [3]:</div><div class=""><br class=""></div><div class="">query = (Person.objects</div><div class="">    .filter(last_name==‘Smith’)</div><div class="">    .order_by('social_security_number')</div><div class=""><div class="">    .select_related('spouse')</div><div class="">    )</div></div><div class=""><br class=""></div><div class="">[1] <a href="http://rhodesmill.org/brandon/slides/2012-11-pyconca/#id183" class="">http://rhodesmill.org/brandon/slides/2012-11-pyconca/#id183</a></div><div class="">[2] <a href="http://rhodesmill.org/brandon/slides/2012-11-pyconca/#knuth-instead-of-pep-8" class="">http://rhodesmill.org/brandon/slides/2012-11-pyconca/#knuth-instead-of-pep-8</a></div><div class="">[3] <a href="http://rhodesmill.org/brandon/slides/2012-11-pyconca/#option-3" class="">http://rhodesmill.org/brandon/slides/2012-11-pyconca/#option-3</a><br class=""><div class="">
<br class="Apple-interchange-newline"><span style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: small; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none;" class="">~ Ian Lee | </span><a href="mailto:IanLee1521@gmail.com" target="_blank" style="font-family: arial, sans-serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(17, 85, 204);" class="">IanLee1521@gmail.com</a>

</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Apr 14, 2016, at 11:48, SW <<a href="mailto:walker_s@hotmail.co.uk" class="">walker_s@hotmail.co.uk</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">That'll teach me for stepping away from the computer...<br class=""><br class="">As for changing an established rule, I agree that can be difficult. The<br class="">reason this one became an irritation for me is that it was only in the<br class="">last few months that I saw flake8 (my style complainer of choice) start<br class="">complaining about this, so it's not quite so entrenched as other<br class="">elements of style.<br class=""><br class="">I agree that placing the binary operator at the end shows the line<br class="">should continue, and thus could be valid, but I also think that placing<br class="">it at the start of the next line shows the logic flow for each part of<br class="">the expression more clearly- as shown in the examples I originally gave.<br class=""><br class="">Thanks,<br class="">S<br class=""><br class="">On 14/04/16 18:23, Guido van Rossum wrote:<br class=""><blockquote type="cite" class="">Thanks, that was obviously an oversight. I've fixed the PEP.<br class=""><br class="">If the discussion ends up with rough consensus on changing this I will<br class="">happily change it back (and change all other occurrences to match the<br class="">new rule).<br class=""><br class="">Note that my request for "rough consensus" does *not* imply a vote. +1<br class="">and -1 votes (nor fractions in between) should not be posted --<br class="">however cogent arguments for/against the status quo (or for<br class="">relinquishing the rule altogether) are welcome.<br class=""><br class="">On Thu, Apr 14, 2016 at 10:02 AM, Matthias welp <<a href="mailto:boekewurm@gmail.com" class="">boekewurm@gmail.com</a>> wrote:<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">Where in PEP 8 does it violate its own advice<br class=""></blockquote>As the OP did not reply this fast, from the webpage (/dev/peps/pep-0008)<br class=""><br class="">section indentation, just after 'Acceptable options in this situation<br class="">include, but are not limited to: '<br class=""><br class=""># Add some extra indentation on the conditional continuation line.<br class="">if (this_is_one_thing<br class="">        and that_is_another_thing):<br class="">    do_something()<br class=""><br class="">That is the only place I could find just now.<br class=""><br class=""><br class="">_______________________________________________<br class="">Python-ideas mailing list<br class=""><a href="mailto:Python-ideas@python.org" class="">Python-ideas@python.org</a><br class="">https://mail.python.org/mailman/listinfo/python-ideas<br class="">Code of Conduct: http://python.org/psf/codeofconduct/<br class=""></blockquote><br class=""><br class=""></blockquote><br class=""><br class="">_______________________________________________<br class="">Python-ideas mailing list<br class=""><a href="mailto:Python-ideas@python.org" class="">Python-ideas@python.org</a><br class="">https://mail.python.org/mailman/listinfo/python-ideas<br class="">Code of Conduct: http://python.org/psf/codeofconduct/<br class=""></div></div></blockquote></div><br class=""></div></body></html>