[Python-ideas] Evolution of Style Guides

Florian Bruhin me at the-compiler.org
Wed Mar 18 08:30:04 CET 2015


* Andrew Barnert <abarnert at yahoo.com.dmarc.invalid> [2015-03-18 00:18:02 -0700]:
> On Mar 17, 2015, at 11:33 PM, Ian Lee <ianlee1521 at gmail.com> 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 at 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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150318/5675a823/attachment.sig>


More information about the Python-ideas mailing list