[Python-ideas] gofmt for Python: standardized styling as a language feature

Stephen J. Turnbull stephen at xemacs.org
Fri Mar 20 06:02:47 CET 2015


Donald Stufft writes:
>>>>> Guido van Rossum writes:

 > > I have always been skeptical of automatic style checkers. They
 > > encourage a nit-pickish attitude that makes the development
 > > process less effective, by encouraging critique of superficial
 > > style elements rather than of the code's structure and
 > > meaning. In contrast, the intention of PEP 8 was to make code
 > > more readable so that its structure and meaning are more easily
 > > understood.
 > 
 > My experience is actually the exact opposite.

This is one of those things where people differ.  I'm happy to follow
Guido on this, although personally I've been able to adapt to
mechanical rules where required.

 > In my experience projects without mechnical enforcement ends up
 > with massively inconsistent style all throughout the code base. The
 > Python stdlib is a good example of this. Contrast this to projects
 > like github.com/pyca/cryptography
 > <http://github.com/pyca/cryptography> where there is an automated
 > mechanical enforcement of style and it’s got some bare minimum of
 > consistency throughout the entire code base.

Which proves what?  That enforcing minimal style rules (and I think we
all agree that there's plenty of good and bad style that machines
can't yet reliably distinguish) results in a code base that follows
minimal style rules?



More information about the Python-ideas mailing list