10000 gh-101100: Fix references in csv docs (GH-114658) · python/cpython@3911b42 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3911b42

Browse files
smontanarohugovk
andauthored
gh-101100: Fix references in csv docs (GH-114658)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parent e5e1866 commit 3911b42

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

Doc/library/csv.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ The :mod:`csv` module defines the following functions:
8888

8989
Return a writer object responsible for converting the user's data into delimited
9090
strings on the given file-like object. *csvfile* can be any object with a
91-
:func:`write` method. If *csvfile* is a file object, it should be opened with
91+
:meth:`~io.TextIOBase.write` method. If *csvfile* is a file object, it should be opened with
9292
``newline=''`` [1]_. An optional *dialect*
9393
parameter can be given which is used to define a set of parameters specific to a
9494
particular CSV dialect. It may be an instance of a subclass of the
@@ -197,10 +197,10 @@ The :mod:`csv` module defines the following classes:
197197
Create an object which operates like a regular writer but maps dictionaries
198198
onto output rows. The *fieldnames* parameter is a :mod:`sequence
199199
<collections.abc>` of keys that identify the order in which values in the
200-
dictionary passed to the :meth:`writerow` method are written to file
200+
dictionary passed to the :meth:`~csvwriter.writerow` method are written to file
201201
*f*. The optional *restval* parameter specifies the value to be
202202
written if the dictionary is missing a key in *fieldnames*. If the
203-
dictionary passed to the :meth:`writerow` method contains a key not found in
203+
dictionary passed to the :meth:`~csvwriter.writerow` method contains a key not found in
204204
*fieldnames*, the optional *extrasaction* parameter indicates what action to
205205
take.
206206
If it is set to ``'raise'``, the default value, a :exc:`ValueError`
@@ -374,8 +374,8 @@ Dialects and Formatting Parameters
374374

375375
To make it easier to specify the format of input and output records, specific
376376
formatting parameters are grouped together into dialects. A dialect is a
377-
subclass of the :class:`Dialect` class having a set of specific methods and a
378-
single :meth:`validate` method. When creating :class:`reader` or
377+
subclass of the :class:`Dialect` class containing various attributes
378+
describing the format of the CSV file. When creating :class:`reader` or
379379
:class:`writer` objects, the programmer can specify a string or a subclass of
380380
the :class:`Dialect` class as the dialect parameter. In addition to, or instead
381381
of, the *dialect* parameter, the programmer can also specify individual
@@ -492,9 +492,9 @@ DictReader objects have the following public attribute:
492492
Writer Objects
493493
--------------
494494

495-
:class:`Writer` objects (:class:`DictWriter` instances and objects returned by
495+
:class:`writer` objects (:class:`DictWriter` instances and objects returned by
496496
the :func:`writer` function) have the following public methods. A *row* must be
497-
an iterable of strings or numbers for :class:`Writer` objects and a dictionary
497+
an iterable of strings or numbers for :class:`writer` objects and a dictionary
498498
mapping fieldnames to strings or numbers (by passing them through :func:`str`
499499
first) for :class:`DictWriter` objects. Note that complex numbers are written
500500
out surrounded by parens. This may cause some problems for other programs which

Doc/tools/.nitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ Doc/library/asyncio-policy.rst
2525
Doc/library/asyncio-subprocess.rst
2626
Doc/library/bdb.rst
2727
Doc/library/collections.rst
28-
Doc/library/csv.rst
2928
Doc/library/dbm.rst
3029
Doc/library/decimal.rst
3130
Doc/library/email.charset.rst

0 commit comments

Comments
 (0)
0