PEP8 compliance

Chris Angelico rosuav at gmail.com
Wed Jun 13 16:09:04 EDT 2018


On Thu, Jun 14, 2018 at 1:45 AM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> On Wed, 13 Jun 2018 08:04:27 -0700, T Berger wrote:
>
>> Sorry for this basic question, but to change my code if it's failed the
>> PEP8 test, what code do I use to open my program and make changes?
>
> Use your text editor to modify the source code of the program.
>
>
> I'm of two minds here... on the one hand, I think that generally
> speaking, PEP 8 is a good style guide to follow, and I think that in the
> long run using a consistent style is a good habit to get into.
>
> On the other hand, some people follow PEP 8 religiously, except for the
> most important rule of all: the one about knowing when to break all the
> other rules. They can get obsessed with following PEP 8 rules even when
> it makes the code *worse*. I don't want to encourage that way of thinking.

... and THIS RIGHT HERE is why the tool should not be called "pep8".
Didn't this exact discussion come up and the tool got renamed? There's
big confusion here between "following PEP 8" (the document) and
"failing the PEP8 test" (the tool).

ChrisA



More information about the Python-list mailing list