Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!lightspeed.eweka.nl!81.171.88.250.MISMATCH!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!news.astraweb.com!border5.a.newsrouter.astraweb.com!not-for-mail From: Ben Finney Newsgroups: comp.lang.python Subject: Re: automated pep8 reformatter ? References: <87ipuh4mig.fsf@benfinney.id.au> X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney Date: Thu, 14 Apr 2011 13:06:34 +1000 Message-ID: <874o614jlx.fsf@benfinney.id.au> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:rUTvJMEgT2/kWQXK8Xd3dnSZqHA= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Lines: 28 Organization: Unlimited download news at news.astraweb.com NNTP-Posting-Host: 826523fc.news.astraweb.com X-Trace: DXC=VaP=M^5MF9d^5mDXS]l4MgL?0kYOcDh@j7^o:UA4R?ceSeIITl]BLhb]G;2>V^?kWcbEW9A[5UK?eNZ[SL`C\KgcbJoFbYPhm0m Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:3162 James Mills writes: > What I really want is to fix up common "poor" (IHMO) coding styles > in code that I have to maintain/review/etc. Things like: > * Lines longer than 80 characters > * Comments tacked on to the end of statements/expressions > * Use of ' vs. " > * More liberal use of Whitespace Most of those don't have sensible automated responses. There aren't good automatic answers to “where should this line of code be broken to fit within 80 columns?” or “where should this end-line comment go instead?”. > Why ? Simple. Being vision impaired (in fact legally blind of <1% > sight) I find it hard to read and maintain code that exhibits poor > coding style (especially the above). -- It is of course very personal > and very subjective. (But hey maybe I should write a tool anyway!) If you come up with algorithmic answers to all the above problems, yes, you could write such a tool. But I doubt it would be generally applicable; and consequently, I doubt that a generally-applicable tool already exists that fits your tastes. -- \ “I tell you the truth: some standing here will not taste death | `\ before they see the Son of Man coming in his kingdom.” —Jesus, | _o__) c. 30 CE, as quoted in Matthew 16:28 | Ben Finney