Issue 11929: Improve usage of PEP8 in Docs/includes/* (original) (raw)

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/56138

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 2022-04-11 14:57 by admin. 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
2022-04-11 14:57:16 admin set github: 56138
2011-04-26 21:00:15 python-dev set nosy: + python-devmessages: +
2011-04-26 20:58:52 rhettinger set status: open -> closedresolution: fixedmessages: +
2011-04-26 19:32:22 rhettinger set messages: +
2011-04-26 19🔞27 belopolsky set messages: +
2011-04-26 18:59:57 belopolsky set nosy: + belopolskymessages: +
2011-04-26 18:53:37 rhettinger set assignee: docs@python -> rhettinger
2011-04-26 18:47:00 rhettinger set priority: normal -> lownosy: + rhettingermessages: +
2011-04-26 18:19:16 sandro.tosi create