mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
bpo-34003: Use dict instead of OrderedDict in csv.DictReader (GH-8014)
This commit is contained in:
parent
a1f9a3332b
commit
9f3f0931cf
3 changed files with 9 additions and 8 deletions
|
|
@ -11,7 +11,6 @@ from _csv import Error, __version__, writer, reader, register_dialect, \
|
|||
__doc__
|
||||
from _csv import Dialect as _Dialect
|
||||
|
||||
from collections import OrderedDict
|
||||
from io import StringIO
|
||||
|
||||
__all__ = ["QUOTE_MINIMAL", "QUOTE_ALL", "QUOTE_NONNUMERIC", "QUOTE_NONE",
|
||||
|
|
@ -117,7 +116,7 @@ class DictReader:
|
|||
# values
|
||||
while row == []:
|
||||
row = next(self.reader)
|
||||
d = OrderedDict(zip(self.fieldnames, row))
|
||||
d = dict(zip(self.fieldnames, row))
|
||||
lf = len(self.fieldnames)
|
||||
lr = len(row)
|
||||
if lf < lr:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue