classification
Title: Intendation issue in example code in itertools.count documentation
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.4, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, eli.bendersky, jeroen-vangoey, python-dev, rhettinger
Priority: normal Keywords: patch

Created on 2013-09-03 08:08 by jeroen-vangoey, last changed 2013-09-05 06:45 by rhettinger. This issue is now closed.

Files
File name Uploaded Description Edit
2.7itertoolsmodule.c.patch jeroen-vangoey, 2013-09-03 08:31 Patch for Python 2.7.4
3.4itertoolsmodule.c.patch jeroen-vangoey, 2013-09-03 08:32 Patch for Python 3.4.0a1
Messages (7)
msg196826 - (view) Author: Jeroen Van Goey (jeroen-vangoey) * Date: 2013-09-03 08:08
The sample code in the itertools.count documentation should be indented by 4 spaces.

For 2.7.4: lines 3429 till 3432 in http://hg.python.org/releasing/2.7.4/file/026ee0057e2d/Modules/itertoolsmodule.c#l3429

For 3.4.0a1: lines 3981 till 3984 in http://hg.python.org/releasing/py3.4.0a1/file/edc668a667ad/Modules/itertoolsmodule.c#l3981

Also, the example code uses the arguments 'firstval' and 'step' whereas the documentation of the function itself uses the arguments 'start' and 'step'. Maybe better be consistent and use as first argument 'start' in both cases?
msg196827 - (view) Author: Jeroen Van Goey (jeroen-vangoey) * Date: 2013-09-03 08:31
Patch for Python 2.7.4 attached
msg196829 - (view) Author: Jeroen Van Goey (jeroen-vangoey) * Date: 2013-09-03 08:32
Patch for Python 3.4.0a1 attached
msg196840 - (view) Author: Eli Bendersky (eli.bendersky) * (Python committer) Date: 2013-09-03 13:35
LGTM, thanks
msg196841 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-09-03 13:39
New changeset 8e174ee0575a by Eli Bendersky in branch '3.3':
Issue #18912: Fix indentation in docstring
http://hg.python.org/cpython/rev/8e174ee0575a

New changeset 31ef590a0d2f by Eli Bendersky in branch 'default':
Issue #18912: Fix indentation in docstring
http://hg.python.org/cpython/rev/31ef590a0d2f
msg196843 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-09-03 13:42
New changeset a559cda6a498 by Eli Bendersky in branch '2.7':
Close #18912: Fix indentation in docstring
http://hg.python.org/cpython/rev/a559cda6a498
msg196981 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2013-09-05 06:45
Please assign itertools doc changes to me in the future.
History
Date User Action Args
2013-10-06 17:35:45georg.brandllinkissue14101 superseder
2013-09-05 06:45:42rhettingersetnosy: + rhettinger
messages: + msg196981
2013-09-03 13:42:30python-devsetstatus: open -> closed
resolution: fixed
messages: + msg196843

stage: patch review -> resolved
2013-09-03 13:39:27python-devsetnosy: + python-dev
messages: + msg196841
2013-09-03 13:35:51eli.benderskysetnosy: + eli.bendersky
messages: + msg196840
2013-09-03 10:51:10asvetlovsetstage: patch review
2013-09-03 08:32:30jeroen-vangoeysetfiles: + 3.4itertoolsmodule.c.patch

messages: + msg196829
2013-09-03 08:31:54jeroen-vangoeysetfiles: + 2.7itertoolsmodule.c.patch
keywords: + patch
messages: + msg196827
2013-09-03 08:08:49jeroen-vangoeysethgrepos: - hgrepo207
2013-09-03 08:08:26jeroen-vangoeycreate