* Andrew Barnert
On Mar 17, 2015, at 11:33 PM, Ian Lee
wrote: * There are a number of checks that are disabled in pep8 by default, due to their being somewhat controversial for many users [5] which you can read about what each of them are for in the docs [6] if you're interested.
I don't know that the rules themselves are necessarily controversial, so much as the way the checks are implemented.
I enabled E226 to see what it does (just because it sounded like the easiest one to test without reading further).
It flags the "Yes" examples from the PEP ("c = (a+b) * (a-b)") as an error, and passes the corresponding "No" examples ("c = (a + b) * (a - b)"). No wonder it's controversial.
What's going on? The rule it enforces is "always put whitespace around arithmetic operators", but the rule in the PEP is "If operators with different priorities are used, consider adding whitespace around the operators with the lowest priority(ies)."
That was an addition made "recently" to pep8: https://hg.python.org/peps/diff/37af28ad2972/pep-0008.txt I guess pep8 adopted by disabling that check by default, rather than completely removing it. Florian -- http://www.the-compiler.org | me@the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc I love long mails! | http://email.is-not-s.ms/