Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #16727

Re: whitespace cleanup

Date 2011-12-06 13:22 +0000
From Andrea Crotti <andrea.crotti.0@gmail.com>
Subject Re: whitespace cleanup
References <4EDDFC48.2000903@gmail.com> <4EDE0166.1030006@gmail.com> <4EDE03BD.2030106@gmail.com> <CAPTjJmp3YTMJR8wRasvJZAvShUN0JtF2HSTh_U9r_GTfeaPkFQ@mail.gmail.com> <4EDE07C8.3050004@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.3348.1323177732.27778.python-list@python.org> (permalink)

Show all headers | View raw


So apparently PythonTidy uses the AST (the compiler module) to find out 
the problems,
and generates new nodes with a put method to write out the code with the 
fix.

An awful lot of code is needed to make it work apparently, not very neat.
Pep8 instead uses tokenize and regular expressions only, and the code
is much neater, not sure how is possible to make it fix things though.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: whitespace cleanup Andrea Crotti <andrea.crotti.0@gmail.com> - 2011-12-06 13:22 +0000

csiph-web