File tree 1 file changed +7
-4
lines changed 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,11 @@ The :mod:`csv` module defines the following functions:
55
55
56
56
.. function :: reader(csvfile, dialect='excel', **fmtparams)
57
57
58
- Return a reader object which will iterate over lines in the given *csvfile *.
59
- *csvfile * can be any object which supports the :term: `iterator ` protocol and returns a
60
- string each time its :meth: `!__next__ ` method is called --- :term: `file objects
61
- <file object> ` and list objects are both suitable. If *csvfile * is a file object,
58
+ Return a :ref: `reader object <reader-objects >` that will process
59
+ lines from the given *csvfile *. A csvfile must be an iterable of
60
+ strings, each in the reader's defined csv format.
61
+ A csvfile is most commonly a file-like object or list.
62
+ If *csvfile * is a file object,
62
63
it should be opened with ``newline='' ``. [1 ]_ An optional
63
64
*dialect * parameter can be given which is used to define a set of parameters
64
65
specific to a particular CSV dialect. It may be an instance of a subclass of
@@ -449,6 +450,8 @@ Dialects support the following attributes:
449
450
When ``True ``, raise exception :exc: `Error ` on bad CSV input.
450
451
The default is ``False ``.
451
452
453
+ .. _reader-objects :
454
+
452
455
Reader Objects
453
456
--------------
454
457
You can’t perform that action at this time.
0 commit comments