This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: csv documentation is incorrect
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.7, Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Mariatta, NRGunby, docs@python, josh.r, lukasz.langa, sanketdg
Priority: normal Keywords: easy

Created on 2014-03-25 04:11 by NRGunby, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 146 merged aktech, 2017-02-18 09:14
PR 1749 merged Mariatta, 2017-05-23 05:11
PR 1750 merged Mariatta, 2017-05-23 05:12
Messages (6)
msg214775 - (view) Author: (NRGunby) Date: 2014-03-25 04:11
The documentation for the csv reader objects next() method is incorrect. It states '
csvreader.next()

Return the next row of the reader’s iterable object as a list, parsed according to the current dialect.'

Either the documentation for DictReader objects needs to be be made separate from normal reader objects, or this needs to be amended to say '
csvreader.next()

Return the next row of the reader’s iterable object as a list (if reader) or dict (if DictReader), parsed according to the current dialect.
'
 
I observed this in the 2.7 online docs, found it to be the case in the 3.4 online docs as well, and haven't checked other versions but assume it's the case.
msg214856 - (view) Author: Josh Rosenberg (josh.r) * (Python triager) Date: 2014-03-25 21:53
Aside from the method being named __next__(), it's the same flaw in all copies of the Py3 documentation.

I don't think explicitly enumerating types is the way to go though. I'd just remove the documentation for __next__, and leave it up to the per-type documentation to describe the data structure returned when iterating. None of the other built-in types in Py3 bother to explicitly document "internal" methods like __next__, but rather describe iteration while describing the type itself.
msg287704 - (view) Author: Sanket Dasgupta (sanketdg) * Date: 2017-02-13 15:31
Hi, I am looking to fix this bug.

So as per the discussion, should I remove the documentation of __next__() ?
msg294221 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2017-05-23 05:09
New changeset d618c8c6d31b9b288f8a070417683974eb98e3ba by Mariatta (Amit Kumar) in branch 'master':
bpo-21056: Document return type of next method of csv reader (#146)
https://github.com/python/cpython/commit/d618c8c6d31b9b288f8a070417683974eb98e3ba
msg294227 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2017-05-23 05:27
New changeset 6ef0882303cff24c58785bb1082250088266886d by Łukasz Langa (Mariatta) in branch '3.6':
[3.6] bpo-21056: Document return type of next method of csv reader (GH-146) (#1749)
https://github.com/python/cpython/commit/6ef0882303cff24c58785bb1082250088266886d
msg294228 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2017-05-23 05:27
New changeset 32dcf426ad2ae10e24e92f60e99dbb4939fb2021 by Łukasz Langa (Mariatta) in branch '3.5':
[3.5] bpo-21056: Document return type of next method of csv reader (GH-146) (#1750)
https://github.com/python/cpython/commit/32dcf426ad2ae10e24e92f60e99dbb4939fb2021
History
Date User Action Args
2022-04-11 14:58:00adminsetgithub: 65255
2017-05-23 08:13:45Mariattasetstatus: open -> closed
resolution: fixed
stage: backport needed -> resolved
2017-05-23 05:27:13lukasz.langasetmessages: + msg294228
2017-05-23 05:27:04lukasz.langasetnosy: + lukasz.langa
messages: + msg294227
2017-05-23 05:12:01Mariattasetpull_requests: + pull_request1838
2017-05-23 05:11:45Mariattasetpull_requests: + pull_request1837
2017-05-23 05:10:22Mariattasetstage: needs patch -> backport needed
versions: + Python 3.7, - Python 2.7
2017-05-23 05:09:44Mariattasetnosy: + Mariatta
messages: + msg294221
2017-02-18 09:14:44aktechsetpull_requests: + pull_request110
2017-02-13 15:31:56sanketdgsetnosy: + sanketdg
messages: + msg287704
2016-08-06 00:07:35berker.peksagsetkeywords: + easy
stage: needs patch
versions: + Python 3.5, Python 3.6, - Python 3.4
2014-03-25 21:53:22josh.rsetnosy: + josh.r
messages: + msg214856
2014-03-25 04:11:42NRGunbycreate