[Python-ideas] Change repr of collections.OrderedDict to be more dict-like

Michael Selik mike at selik.org
Thu Jul 26 18:41:12 EDT 2018


Sounds good to me. It'll make OrderedDict look much nicer at the REPL.


On Thu, Jul 26, 2018 at 10:21 AM Terry Reedy <tjreedy at udel.edu> wrote:

> I am not sure what our repr change policy is, as there is a
> back-compatibility issue but I remember there being changes.


Given the way different Python prompts feel free to change reprs, I always
understood the repr to have no compatibility guarantees.


On Thu, Jul 26, 2018 at 10:31 AM David Mertz <mertz at gnosis.cx> wrote:

> Repr changes are likely to break doctests, at least. That's not
> necessarily an absolute "no", but it does raise the bar.
>

Breaking doctests is somewhat annoying, but I understand that to be more
about verifying the accuracy of documentation than verifying the
correctness of code. It's handy for following TDD, but that's during the
initial development and a changed repr won't interfere.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180726/2c1a1663/attachment.html>


More information about the Python-ideas mailing list