On February 8, May 3, 2016, PEP8 released a version update: PEP8 -- StyleGuideforPythonCode. During code check, colleagues found that the if condition previously written was incorrectly styled, the reason is that and is placed at the beginning of the branch. In the new PEP8 standard, we recommend that you put and at the end of a line for clearer line breaks, however, the relationship between the statements should be clearer in the front. What do you think about the position of and in the if condition and the update? In May 3, 2016, PEP8 released a version update: PEP 8 -- Style Guide for Python Code
When checking the code, colleagues found that the if condition previously written was in bad style because and was placed at the beginning of the branch, in the new PEP8 specification, we recommend that you put and at the end of a line for a clearer line feed, but the relationship between statements should be clearer before it, what do you think about the position of and in the if condition and the update? Reply: PEP 8 released a version update on April 8, April 15, 2016. It changed the previously defined "linefeed should be placed after the binary operator" to "linefeed is recommended to be placed before the binary operator 」.
After reading The updated information, it seems that someone has dug up The book "The TeXbook" by Uncle Donald Knuth ", then we found that in the Displayed Equation chapter in the book, Knuth indicates that the formula should put the line break before the binary or relational operator in the case of multiple rows:
The reason for doing so seems to be more readable, such as the example given in PEP 8:
Income = (gross_wages + taxable_interest + (pidends-qualified_pidends)-ira_deduction-student_loan_interest)
With pycharm, there is no wavy line, and it looks comfortable... Original PEP style + 1
Get rid of Python and take jujube pills + 1