[Python-Dev] Tweaking PEP 8 guidelines for use of leading underscores

Chris McDonough chrism at plope.com
Tue Jul 16 05:16:46 CEST 2013


On Tue, 2013-07-16 at 13:11 +1000, Nick Coghlan wrote:
> On 16 July 2013 13:02, Chris McDonough <chrism at plope.com> wrote:
> > OSS developers have spent many months jumping through bw incompat hoops
> > in Python over the last few years, and it has taken time away from doing
> > things that provide value.  The less I can do of that, the better, and
> > Python gets more value too.  That said, I realize that I'm in the
> > minority because I happen to have a metric ton of public code out there.
> > But it'd be nice if that was encouraged rather than effectively punished
> > on the hunch that it might provide some benefit for a theoretical new
> > user.
> 
> You, Armin and everyone else that works on the bytes/text boundary are
> indeed the hardest hit by the Python 3 transition, and I appreciate
> the hard work you have all done to help make that transition as
> successful as it has been so far.
> 
> However, the fact that people abuse PEP 8 by treating it as "all
> Python code in the world should follow these rules" cannot, and will
> not, stop us from continuing to use it to set appropriate guidelines
> *for the standard library*.
> 
> I'll look into adding some stronger wording at the top making it clear
> that while PEP 8 is a useful starting point and a good default if a
> project doesn't have a defined style guide of it's own, it is *not*
> the be-all-and-end-all for Python style guides. Treating it as such as
> an abuse of the PEP, pure and simple.

I understand that.  Unfortunately the remainder of the world does not.
The same IDEs that would be helped via this proposed change have "PEP8
modes" turned on *by default*!
http://blog.jetbrains.com/pycharm/2013/02/long-awaited-pep-8-checks-on-the-fly-improved-doctest-support-and-more-in-pycharm-2-7/

It seems like an unwise step to continue stuffing things into the PEP8
brand bag as a result if that stuff is only meant to apply to the
stdlib.

- C




More information about the Python-Dev mailing list