On Mon, Aug 30, 2021 at 11:32:20AM -0700, Nick Parlante wrote:

> As a practical matter, the way this comes up for my students is that
> IDEs by default will put warning marks around PEP8 violations in their
> code.

I'm not fond of linters that flag PEP 8 violations. And if I recall 
correctly, I think Guido is likewise not convinced that they are a good 
idea.

Anyway, it doesn't matter. Your IDE ought to be configurable to enable 
or disable that rule. For example:

https://www.jetbrains.com/help/pycharm/configuring-code-style.html

You ought to be able to come up with a config that disables that 
specific rule, and distribute it to your students automatically. You may 
need to determine which linter the IDE uses to check for style 
violations, and provide a config specifically for that linter.

If you tell us what IDE your school or department uses, we might even be 
able to tell you what config you need.

And in practical terms, that will likely be much, much faster than 
waiting for us to change PEP 8, the linters to change their tests, and 
the IDEs to be updated to use the new versions of the linters.

> Here is my proposal:
> 
> Add the following parenthetical to the mandatory-is rule: (this rule
> is optional for code that is not part of an implementation of Python).

None of PEP-8 is mandatory except for the stdlib, and even there, it's 
more of a guideline than a rule.

Why do PEP-8 zealots never, ever read the most important rule of PEP-8? 
It's right at the top too, just after the introduction. (Sorry Nick, 
this is not aimed at you personally.)

https://www.python.org/dev/peps/pep-0008/#a-foolish-consistency-is-the-hobgoblin-of-little-minds



-- 
Steve
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/QSECKF7K4MKOMJGINJFZGLBW4MOKY74Q/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to