Issue 32339: Make the dict type used in csv.DictReader configurable (original) (raw)

Issue32339

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 https://github.com/python/cpython/pull/4904 is closed now, I think this issue should be closed now?
History
Date User Action Args
2022-04-11 14:58:55 admin set github: 76520
2021-12-17 11:07:10 asaka set nosy: + asakamessages: +
2017-12-16 14:01:52 shangdahao set keywords: + patchstage: needs patch -> patch reviewpull_requests: + <pull%5Frequest4799>
2017-12-16 00:25:09 rhettinger set nosy: + rhettingermessages: +
2017-12-15 19:00:53 serhiy.storchaka create