]> granicus.if.org Git - python/commit
pprint functions used to sort a dict (by key) if and only if
authorTim Peters <tim.peters@gmail.com>
Fri, 2 Jun 2006 23:22:51 +0000 (23:22 +0000)
committerTim Peters <tim.peters@gmail.com>
Fri, 2 Jun 2006 23:22:51 +0000 (23:22 +0000)
commitd609b1a20e9cc100d2998e030ec88347b6943904
tree1b21822316e37c0d09f0e5e1f64156e5a2bb1b4f
parent7f7386cfd2936a552d73fed2ddd12c5a54004034
pprint functions used to sort a dict (by key) if and only if
the output required more than one line.  "Small" dicts got
displayed in seemingly random order (the hash-induced order
produced by dict.__repr__).  None of this was documented.
Now pprint functions always sort dicts by key, and the docs
promise it.

This was proposed and agreed to during the PyCon 2006 core
sprint -- I just didn't have time for it before now.
Doc/lib/libpprint.tex
Lib/pprint.py
Lib/test/test_pprint.py
Misc/NEWS