Title: csv documentation is incorrect
Type: behavior Stage: needs patch
Components: Documentation Versions: Python 3.6, Python 3.5, Python 2.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: NRGunby, docs@python, josh.r, sanketdg
Priority: normal Keywords: easy

Created on 2014-03-25 04:11 by NRGunby, last changed 2017-02-18 09:14 by aktech.

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

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 '

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) * 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__() ?
Date User Action Args
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