[IPython-dev] display of dicts?

Chris Barker chris.barker at noaa.gov
Tue Dec 19 12:55:34 EST 2017


On Tue, Dec 19, 2017 at 9:50 AM, Steve Holden <steve at holdenweb.com> wrote:

>
> ​What about adding a "sorted" method to dicts that produces a dict with
> the same keys but the keys inserted ​in sorted order?
>

That would be a job for python-dev, yes?

And maybe .sort() that sorts in place instead -- similar to lists.

Too bad that the plain sorted() function only gives you the keys.. though
there is

dict(sorted(d.items()))


to get a sorted dict.


-CHB

-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20171219/c9702c17/attachment.html>


More information about the IPython-dev mailing list