bpo-34003: Use dict instead of OrderedDict in csv.DictReader by selik · Pull Request #8014 · python/cpython

@selik

DictReader can now use basic dicts instead of OrderedDict, as of version
3.7's change to specify that dict maintains keys in insertion order.
This will be more efficient and more pleasant to read at the interactive
prompt.

I also changed a list comprehension to a generator expression inside of
a ``", ".join()`` to avoid the unnecessary list construction.

@selik

str.join creates a list internally if the input is not a list or tuple.
Passing a generator expression only adds overhead.

@selik selik deleted the fix-issue-34003 branch

January 31, 2019 15:30

merwok

merwok added a commit that referenced this pull request

Jun 5, 2020

This was referenced

Jun 10, 2020

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Jun 10, 2020
Follow-up to pythonGH-8014
(cherry picked from commit 7aed052)

Co-authored-by: Éric Araujo <merwok@netwok.org>

andreas-stuerz pushed a commit to andreas-stuerz/plugins that referenced this pull request

Aug 10, 2021