bpo-34003: Use dict instead of OrderedDict in csv.DictReader by selik · Pull Request #8014 · python/cpython
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.
str.join creates a list internally if the input is not a list or tuple. Passing a generator expression only adds overhead.
selik
deleted the
fix-issue-34003
branch
This was referenced
Jun 10, 2020miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
Jun 10, 2020Follow-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, 2021This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters