<div dir="ltr">Let's not change pprint.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 22, 2017 at 7:44 AM, Eric Fahlgren <span dir="ltr"><<a href="mailto:ericfahlgren@gmail.com" target="_blank">ericfahlgren@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><div class="gmail_default" style="color:#000000"><span style="color:rgb(34,34,34)">On Thu, Dec 21, 2017 at 7:51 PM, Stephen J. Turnbull </span><span dir="ltr" style="color:rgb(34,34,34)"><<a href="mailto:turnbull.stephen.fw@u.tsukuba.ac.jp" target="_blank">turnbull.stephen.fw@u.<wbr>tsukuba.ac.jp</a>></span><span style="color:rgb(34,34,34)"> wrote:</span><br></div></span><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I understand the motivation to guarantee order, but it's a programmer<br>
convenience that has nothing to do with the idea of mapping, and the<br>
particular (insertion) order is very special and usually neither<br>
relevant nor reproducible.  I have no problem whatsoever with just<br>
documenting any failure to preserve order while reproducing dicts,<br>
*except* that a process that inserts keys in the same order had better<br>
result in the same insertion order.<br></blockquote><div><br></div></span><div class="gmail_default" style="color:rgb(0,0,0)">​json, pickle == png, i.e., guaranteed lossless.</div><div class="gmail_default" style="color:rgb(0,0,0)">repr, pprint == jpg, lossy for very specific motivating reasons.​</div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)">In particular, I use pprint output in regression baselines, and if the long documented sort-by-key behavior changed, I would not be happy.</div></div></div></div>
<br>______________________________<wbr>_________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/guido%40python.org" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/options/python-dev/<wbr>guido%40python.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div>