Re: Incompatible change discussion: Pretty printing of ordered dict.

Damián Avila <[email protected]> Thu, 10 Aug 2017 09:28:16 -0300
Newsgroups gmane.comp.python.ipython.devel
Message-ID <CAH+mRR1hz5jJKupBt9wY1K8O+opOpOTs4Kx7Z4qskZU6AqoKDg@mail.gmail.com>
--===============1183493543292281061==
Content-Type: multipart/alternative; boundary="f403045ee1c4c1060005566554ed"

--f403045ee1c4c1060005566554ed
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

> If the dict maintaining insertion order becomes a language feature rather
than an implementation detail, I would favour showing that. But for now
it's an implementation detail, so it shouldn't change how we think about
dicts.

I agree.

2017-08-04 17:51 GMT-03:00 Thomas Kluyver <[email protected]>:

> On 4 August 2017 at 21:48, Pietro Terna <[email protected]> wrote:
>
>>     Why in Idle the result is different?
>>
>> Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04)
>> [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
>> Type "copyright", "credits" or "license()" for more information.
>> >>> d =3D {'c':3,'b':2,'a':1}
>> >>> d
>> {'c': 3, 'b': 2, 'a': 1}
>>
>
> IDLE displays the standard Python repr() of an object. Part of IPython is
> a pretty-printing system that tries to provide clearer representations of
> containers like dicts and lists.
>
> Thomas
>
> _______________________________________________
> IPython-dev mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/ipython-dev
>
>


--=20
*Dami=C3=A1n Avila*

--f403045ee1c4c1060005566554ed
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><span style=3D"font-size:12.8px">&gt;=C2=A0</span><sp=
an style=3D"font-size:12.8px">If the dict maintaining insertion order becom=
es a language feature rather than an implementation detail, I would favour =
showing that. But for now it&#39;s an implementation detail, so it shouldn&=
#39;t change how we think about dicts.</span></div><div><span style=3D"font=
-size:12.8px"><br></span></div><div><span style=3D"font-size:12.8px">I agre=
e.</span></div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">2017-08-04 17:51 GMT-03:00 Thomas Kluyver <span dir=3D"ltr">&lt;<a href=
=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&gt;</sp=
an>:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border=
-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail=
_extra"><div class=3D"gmail_quote"><span class=3D"">On 4 August 2017 at 21:=
48, Pietro Terna <span dir=3D"ltr">&lt;<a href=3D"mailto:pietro.terna@unito=
.it" target=3D"_blank">[email protected]</a>&gt;</span> wrote:<br><bloc=
kquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #cc=
c solid;padding-left:1ex"><div text=3D"#000000" bgcolor=3D"#FFFFFF">
    <tt>
      =C2=A0=C2=A0=C2=A0 Why in Idle the result is different?<br>
      <br>
      Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04) <br>
      [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin<br>
      Type &quot;copyright&quot;, &quot;credits&quot; or &quot;license()&qu=
ot; for more information.<span><br>
      &gt;&gt;&gt; d =3D {&#39;c&#39;:3,&#39;b&#39;:2,&#39;a&#39;:1}<br></s=
pan>
      &gt;&gt;&gt; d<span><br>
      {&#39;c&#39;: 3, &#39;b&#39;: 2, &#39;a&#39;: 1}</span></tt>
 =20
   =20
 =20
  </div></blockquote><div><br></div></span><div>IDLE displays the standard =
Python repr() of an object. Part of IPython is a pretty-printing system tha=
t tries to provide clearer representations of containers like dicts and lis=
ts.<span class=3D"HOEnZb"><font color=3D"#888888"><br><br></font></span></d=
iv><span class=3D"HOEnZb"><font color=3D"#888888"><div>Thomas <br></div></f=
ont></span></div></div></div>
<br>______________________________<wbr>_________________<br>
IPython-dev mailing list<br>
<a href=3D"mailto:[email protected]">[email protected]</a><br>
<a href=3D"https://mail.python.org/mailman/listinfo/ipython-dev" rel=3D"nor=
eferrer" target=3D"_blank">https://mail.python.org/<wbr>mailman/listinfo/ip=
ython-dev</a><br>
<br></blockquote></div><br><br clear=3D"all"><div><br></div>-- <br><div cla=
ss=3D"gmail_signature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr">=
<div><div dir=3D"ltr"><b><i>Dami=C3=A1n Avila</i></b></div></div></div></di=
v>
</div>

--f403045ee1c4c1060005566554ed--

--===============1183493543292281061==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
IPython-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/ipython-dev

--===============1183493543292281061==--