classification
Title: Improve usage of PEP8 in Docs/includes/*
Type: Stage: patch review
Components: Documentation Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: belopolsky, docs@python, python-dev, rhettinger, sandro.tosi
Priority: low Keywords: patch

Created on 2011-04-26 18:19 by sandro.tosi, last changed 2011-04-26 21:00 by python-dev. This issue is now closed.

Files
File name Uploaded Description Edit
pep8_doc_includes.patch sandro.tosi, 2011-04-26 18:19 review
Messages (7)
msg134486 - (view) Author: Sandro Tosi (sandro.tosi) * (Python committer) Date: 2011-04-26 18:19
Following up http://mail.python.org/pipermail/docs/2011-April/004032.html I made a run of pep8 on Doc/includes/ py files.

i've prepared a patch against default; if it's considered worth I can prepare patches for the other branches (for sure 2.7 needs a different patch, and probably also 3.1).
msg134487 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2011-04-26 18:46
IMO, this is a complete waste of time and much of the code doesn't actually read any better afterwards.  Some of the mathematical expressions look worse.

There may be some merit to splitting the imports but that isn't worth much either, perhaps not enough to warrant trouncing the version control history on those lines.
msg134488 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2011-04-26 18:59
Another -1 from me.  Similar changes to inline examples in the docs have been rejected in the past for the same reasons as Raymond wrote.  See issue 4649.
msg134490 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2011-04-26 19:18
On the other hand, I would be +0 for the tzinfo-examples fixes of the form:

foo(x=default) vs. foo(x = default)

(This was also the fix suggested on the ML.)

Overall, I think it is good to judicially point out to PEP 8 violations where fixes would improve readability, but mechanical reformatting is likely to be net loss.  I may fix tzinfo-examples next time I touch it.  With addition of timezone class in 3.3, this set of examples needs to be updated.
msg134492 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2011-04-26 19:32
> foo(x=default) vs. foo(x = default)

That's fine.  Most of the rest of it isn't.
msg134498 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2011-04-26 20:58
I put a few of these in (ones where it looked like readability was improved).
msg134499 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-04-26 21:00
New changeset 5e93c5cdc378 by Raymond Hettinger in branch '3.2':
Issue 11929: Minor whitespace clean-ups.
http://hg.python.org/cpython/rev/5e93c5cdc378

New changeset 89fcadbc49df by Raymond Hettinger in branch 'default':
Issue 11929: Minor whitespace clean-ups.
http://hg.python.org/cpython/rev/89fcadbc49df
History
Date User Action Args
2011-04-26 21:00:15python-devsetnosy: + python-dev
messages: + msg134499
2011-04-26 20:58:52rhettingersetstatus: open -> closed
resolution: fixed
messages: + msg134498
2011-04-26 19:32:22rhettingersetmessages: + msg134492
2011-04-26 19:18:27belopolskysetmessages: + msg134490
2011-04-26 18:59:57belopolskysetnosy: + belopolsky
messages: + msg134488
2011-04-26 18:53:37rhettingersetassignee: docs@python -> rhettinger
2011-04-26 18:47:00rhettingersetpriority: normal -> low
nosy: + rhettinger
messages: + msg134487

2011-04-26 18:19:16sandro.tosicreate