summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMichael Selik <mike@selik.org>2019-01-31 08:47:53 (GMT)
committerRaymond Hettinger <rhettinger@users.noreply.github.com>2019-01-31 08:47:53 (GMT)
commit9f3f0931cfc58498086d287226650599a97412bb (patch)
treeec55acd86918244262c99c5d8c888932f6459dd2 /Doc
parenta1f9a3332bd4767e47013ea787022f06b6dbcbbd (diff)
downloadcpython-9f3f0931cfc58498086d287226650599a97412bb.zip
cpython-9f3f0931cfc58498086d287226650599a97412bb.tar.gz
cpython-9f3f0931cfc58498086d287226650599a97412bb.tar.bz2
bpo-34003: Use dict instead of OrderedDict in csv.DictReader (GH-8014)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/csv.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/library/csv.rst b/Doc/library/csv.rst
index 049537e..17534fc 100644
--- a/Doc/library/csv.rst
+++ b/Doc/library/csv.rst
@@ -150,12 +150,12 @@ The :mod:`csv` module defines the following classes:
dialect='excel', *args, **kwds)
Create an object that operates like a regular reader but maps the
- information in each row to an :mod:`OrderedDict <collections.OrderedDict>`
- whose keys are given by the optional *fieldnames* parameter.
+ information in each row to a :class:`dict` whose keys are given by the
+ optional *fieldnames* parameter.
The *fieldnames* parameter is a :term:`sequence`. If *fieldnames* is
omitted, the values in the first row of file *f* will be used as the
- fieldnames. Regardless of how the fieldnames are determined, the ordered
+ fieldnames. Regardless of how the fieldnames are determined, the
dictionary preserves their original ordering.
If a row has more fields than fieldnames, the remaining data is put in a
@@ -166,8 +166,8 @@ The :mod:`csv` module defines the following classes:
All other optional or keyword arguments are passed to the underlying
:class:`reader` instance.
- .. versionchanged:: 3.6
- Returned rows are now of type :class:`OrderedDict`.
+ .. versionchanged:: 3.8
+ Returned rows are now of type :class:`dict`.
A short usage example::
@@ -181,7 +181,7 @@ The :mod:`csv` module defines the following classes:
John Cleese
>>> print(row)
- OrderedDict([('first_name', 'John'), ('last_name', 'Cleese')])
+ {'first_name': 'John', 'last_name': 'Cleese'}
.. class:: DictWriter(f, fieldnames, restval='', extrasaction='raise', \