[Python-Dev] pep8 reasoning
Nick Coghlan
ncoghlan at gmail.com
Sat Apr 26 00:46:38 CEST 2014
On 25 April 2014 18:26, Donald Stufft <donald at stufft.io> wrote:
>> If python-dev wants to control the precise behavior of pep8.py, bring it
>> into the standard library and adopt maintenance of it. Otherwise, please
>> give Florent some grace.
>>
>> Carl
>
> Carl’s post mirrors my own thoughts and it’s said much better than I could have.
>
> pep8.py doesn’t violate PEP8, it just takes a stricter view of it.
In other words, it adds rules that have not been discussed on
python-dev, and effectively claims that those rules are part of PEP 8
when they're not. Note that my problem is *specifically* with errors,
and especially with errors that are on by default. Even with the name
"pep8", warnings and below are clearly at the discretion of the tool
authors and maintainers, and while "off-by-default" errors strike me
as nonsensical (why not just make them warnings instead?), I also
don't have a problem with adding more of them.
However, keeping E121 (which requires all indentation of continued
lines in expressions to also be a multiple of 4, rather than only
semantically significant indentations) and E701 (which completely
disallows the use of single line compound statements, even through the
PEP text only discourages them) as errors rather than warnings is
apparently more important than my wholehearted endorsement of the tool
as a co-author of PEP 8. So be it - but while that is the case, pep8
is *not* a PEP 8 linter, it remains "PEP 8 plus extra rules python-dev
has never discussed".
Regards,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-Dev
mailing list