[Python-ideas] Change repr of collections.OrderedDict to be more dict-like
David Mertz
mertz at gnosis.cx
Thu Jul 26 18:50:20 EDT 2018
I often use doctests to verify APIs and behaviors when I update code. I
know I'm in a minority and most developers slightly disparage doctests.
On Thu, Jul 26, 2018, 6:41 PM Michael Selik <mike at selik.org> wrote:
> 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/88e36245/attachment.html>
More information about the Python-ideas
mailing list