This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Make the dict type used in csv.DictReader configurable
Type: enhancement Stage: patch review
Components: Library (Lib) Versions: Python 3.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: asaka, rhettinger, serhiy.storchaka
Priority: normal Keywords: easy, patch

Created on 2017-12-15 19:00 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin.

Pull Requests
URL Status Linked Edit
PR 4904 closed shangdahao, 2017-12-16 14:01
Messages (3)
msg308420 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-12-15 19:00
Since 3.6 csv.DictReader emits OrderedDicts instead of regular dicts. Since regular dicts are ordered in 3.7, this is an overkill. It would be nice to add a configuration option for a return type.

This is an easy issue.
msg308434 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2017-12-16 00:25
For csv.DictReader and collections.namedtuple._asdict, it might be cleaner to just deprecate the OrderedDict in favor of returning regular dict.  I suspect that in these contexts, no one really wants an actual OrderedDict.
msg408771 - (view) Author: AN Long (asaka) * Date: 2021-12-17 11:07
As is closed now, I think this issue should be closed now?
Date User Action Args
2022-04-11 14:58:55adminsetgithub: 76520
2021-12-17 11:07:10asakasetnosy: + asaka
messages: + msg408771
2017-12-16 14:01:52shangdahaosetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request4799
2017-12-16 00:25:09rhettingersetnosy: + rhettinger
messages: + msg308434
2017-12-15 19:00:53serhiy.storchakacreate