mirror of
https://github.com/kennethreitz/pep8.org.git
synced 2026-06-05 23:10:16 +00:00
Migrate PEP 8 changes made in https://hg.python.org/peps/rev/d05f70bfbd58
This commit is contained in:
+1
-1
@@ -371,7 +371,7 @@ result = some_function_that_takes_arguments(
|
||||
|
||||
<h2 id="break-before-or-after-binary-operator">Should a line break before or after a binary operator?</h2>
|
||||
|
||||
<p>For decades the recommended style has been to break after binary operators. However, recent reseach unearthed recommendations by Donald Knuth to break <em>before</em> binary operators, in his writings about typesetting <a href="#fn4" class="footnoteRef" id="fnref4"><sup>4</sup></a>. Therefore it is permissible to break before or after a binary operator, as long as the convention is consistent locally. For new code Knuth's style is suggested.</p>
|
||||
<p>For decades the recommended style has been to break after binary operators. However, recent research unearthed recommendations by Donald Knuth to break <em>before</em> binary operators, in his writings about typesetting <a href="#fn4" class="footnoteRef" id="fnref4"><sup>4</sup></a>. Therefore it is permissible to break before or after a binary operator, as long as the convention is consistent locally. For new code Knuth's style is suggested.</p>
|
||||
|
||||
<p>Some examples of code breaking before binary Boolean operators:<p>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user