On 26.7.2018 10:24, Grégory Lielens wrote:
I would wait a little bit. OrderedDict will probable become a pure synonym for dict, in a few releases, and the repr issue will solve itself, both giving the even simpler/nicer {'a': '1', 'b': '2'}

Your proposal expose that dicts are ordered (which they are, but it's hidden). Once exposed, OrderedDict are obsolete and should be in the namespace only for backward compatibitlity.

I don't agree. See this thread:

https://mail.python.org/pipermail/python-dev/2018-July/154765.html

Namely:

On 26.7.2018 05:23, INADA Naoki wrote:
> No.  There are some major difference.
>
> * d1 == d2 ignores order / od1 == od2 compares order
> * OrderedDict has move_to_end() method.
> * OrderedDict.pop() takes `last=True` keyword.

--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to