<div dir="ltr"><div class="gmail_default" style="font-size:small">I submitted the patch to make the csv module use an OrderedDict in DictReader. It doesn't, AFAIR, use anything but the ordering property of ordered dict, so the reversion to a simple dict should be perfectly OK as long as no consumers have started to make use of specific OrderedDict properties.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">regards</div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Steve Holden<br></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 31, 2019 at 7:55 AM INADA Naoki <<a href="mailto:songofacandy@gmail.com">songofacandy@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
csv.DictReader uses OrderedDict by default, from Python 3.6.<br>
But it doesn't make sense anymore, like namedtuple._asdict().<br>
How about changing default dict type back to regular dict.<br>
<br>
Python is widely used for handling learge data. So I think<br>
changing default dict type to OrderedDict was performance<br>
and memory usage regression in 3.6.<br>
<br>
Additionally, configparser uses OrderedDict by default from Python 3.6 too.<br>
<br>
I am not sure about `parser['section1'] == parser['section2']` is not used yet.<br>
But we broke it once in 3.6 by changing dict to OrderedDict. Are there any<br>
issue report caused by this backward incompatibility?<br>
<br>
And I think performance and memory efficiency is not so important for<br>
configparser, unlike csv.<br>
<br>
I'm<br>
<br>
* +1 about changing csv.DictReader's default dict type<br>
* +0.5 about changing configparser's default dict type.<br>
<br>
How do you think?<br>
<br>
Regards,<br>
--<br>
INADA Naoki <<a href="mailto:songofacandy@gmail.com" target="_blank">songofacandy@gmail.com</a>><br>
_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/steve%40holdenweb.com" rel="noreferrer" target="_blank">https://mail.python.org/mailman/options/python-dev/steve%40holdenweb.com</a><br>
</blockquote></div>