[Python-Dev] PEPs and PEP 8 changes (original) (raw)

Barry Warsaw barry at python.org
Sun Sep 6 04:58:55 CEST 2015


On Sep 05, 2015, at 03:57 PM, Jim J. Jewett wrote:

Would it be reasonable to ask PEPs to start including a section on any recommended changes to PEP8? (e.g., "If an embedded expression doesn't fit on a single line, factor it out to a named variable.")

Yes, I think it's reasonable to encourage a "best practices" section in relevant PEPs. Those best practices can include recommendations for updates to PEP 8.

I realize that there will be times when best practices (or common mistakes) aren't obvious in advance, but I'm a bit uncomfortable with "PEP 8 will probably grow advice"... if we expect to need such advice, then we should probably include it from the start. (PEP 8 is, after all, only advice.)

Except of course that for some projects, it's more than that. The pep8 (and related) tools are often used in test suites to force style compliance within a project. That's fine except that, to paraphrase Dr. Strangelove, the whole point of such tests is lost if you don't run those tests! I've actually had to fix several packages recently whose pep8 tests fail.

I'm often reluctant to lock PEP 8 down too much because it can sometimes be a straight jacket.

Cheers, -Barry



More information about the Python-Dev mailing list