Hi,

now when dicts are sorted, can we change the repr of collections.OrderedDict to look like dict?

I mean from:

    OrderedDict([('a', '1'), ('b', '2')])

To:

    OrderedDict({'a': '1', 'b': '2'})

I assume the current list-of-tuples repr is there so copy pasting the repr to the interpreter results in the same OrderedDict. When dicts preserve insertion order, this now works with dict.

I consider the dict-based repr much easier to read.

Thoughts?
--
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