bpo-21056: Document return type of next method of csv reader#146
Conversation
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow these steps to rectify the issue:
Thanks again to your contribution and we look forward to looking at it! |
| to the current dialect. Usually you should call this as ``next(reader)``. | ||
| 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. Usually you | ||
| should call this as ``next(reader)``. |
There was a problem hiding this comment.
I think it would be better to change these to:
Return the next row of the reader's iterable object as a list (if the object was returned from
reader()) or a dict (if it is aDictReader) [...]
|
Could you please check the bpo number? bpo-29521 has to do with Sphinx and building documentation, and has nothing to do with CSV support. As far as I know. |
Yeah, Thanks! I have fixed it now. |
| Return the next row of the reader's iterable object as a list, parsed according | ||
| to the current dialect. Usually you should call this as ``next(reader)``. | ||
| Return the next row of the reader's iterable object as a list (if the object | ||
| was returned from ``reader()``) or a dict (if it is a ``DictReader``), parsed |
There was a problem hiding this comment.
reader() is not very clear here. "[...] from :func:`reader`" would be much clearer.
| Return the next row of the reader's iterable object as a list, parsed according | ||
| to the current dialect. Usually you should call this as ``next(reader)``. | ||
| Return the next row of the reader's iterable object as a list (if the object | ||
| was returned from ``reader()``) or a dict (if it is a ``DictReader``), parsed |
There was a problem hiding this comment.
if it is a :class:`DictReader` instance
| to the current dialect. Usually you should call this as ``next(reader)``. | ||
| Return the next row of the reader's iterable object as a list (if the object | ||
| was returned from ``reader()``) or a dict (if it is a ``DictReader``), parsed | ||
| according to the current dialect. Usually you should call this as |
There was a problem hiding this comment.
Add two spaces after a full-stop:
[...] dialect. Usually [...]|
@berkerpeksag Thanks for the Review, I have made the changes now. Please have a look. |
berkerpeksag
left a comment
There was a problem hiding this comment.
Looking at this again, I agree with Josh Rosenberg's comment at https://bugs.python.org/issue21056#msg214856 It would be better to the documentation for __next__ and document the return types of them in their documentation. Plus, we can adapt the examples you gave in #146 (comment) to the existing ones.
|
This looks fine. I'm not sure it is necessary though (I don't recall it ever having been a source of confusion). |
|
Thanks @aktech |
…ythonGH-146) (cherry picked from commit d618c8c)
…ythonGH-146) (cherry picked from commit d618c8c)
|
Added the sprint label, as this PR was submitted at the PyCon Pune 2017 core development sprint. |
This fix prevent a NULL-pointer access (SEGFAULT), if a thread terminates with a MemoryError exception.
This fix prevent a NULL-pointer access (SEGFAULT), if a thread terminates with a MemoryError exception. (cherry picked from commit bcd724c)
Merge the PR if: - PR has "awaiting merge" and "automerge" labels, and - all CI status checks have passed. It will: - replace `#` with `GH-` - get the commit message from PR title and description Closes python/bedevere#14 Closes python/core-workflow#29
This makes sure that the ctypes module is built. See python#146
This makes sure that the ctypes module is built. See python#146
This makes sure that the ctypes module is built. See python#146
This makes sure that the ctypes module is built. See python#146
This makes sure that the ctypes module is built. See python#146
This makes sure that the ctypes module is built. See python#146
csv.reader
csv.DictReader
Contents of
foo.csvDocumentation: https://docs.python.org/3.7/library/csv.html#reader-objects