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

Terry Reedy tjreedy at udel.edu
Fri Mar 20 06:11:27 CET 2015


On 3/19/2015 5:01 PM, Guido van Rossum wrote:
 > On Thu, Mar 19, 2015 at 1:40 PM, Terry Reedy <tjreedy at udel.edu

 >     Having the guidelines numbered (id'ed), even though still regarded
 >     as guidelines, could help communication. Checkers could then easily
 >     refer to specific guidelines.
 >
 > I worry this will just encourage the nit-picky attitude more.

I agree that this is a possible negative.

 >     Thanks for the link.  I was specifically thinking of global
 >     renamings to satisfy PEP 8's Naming Conventions.  Idlelib has a
 >     mishmash of module and function/method name styles.  (I might look
 >     and see what can be done with the undocumented (except as
 >     'unstable') libe2to3.)
 >
 > This feels hard to automate, because you don't know what names are part
 > of an external specification.

Modernizing idlelib names, in relation to PEP 434, is a separate discussion.

 > I think that a quick "clean up whitespace" feature would be a nice
 > addition to IDLE, provided it's a user-selectable menu items (similar to
 > the existing indent/dedent operations).

The Format menu now has 'Strip trailing whitespace', which may be new 
since you last looked.  It needs to strip trailing blank lines, as 
reindent.py does, in addition to trailing whitespace on each line, to 
make files ready to commit to the cpython repository.  Did you have in 
mind also doing within-line cleanups (as a separate menu entry)?

--
Terry Jan Reedy




More information about the Python-ideas mailing list