[issue6945] pprint.pprint does not pprint unsortable dicts in Python 3
Georg Brandl
report at bugs.python.org
Sat Sep 19 15:11:50 CEST 2009
Georg Brandl <georg at python.org> added the comment:
A simple fix is to use key=lambda x: (id(type(x)), x). However, that
obviously doesn't work with values of different, but orderable types.
At the moment, I don't see how the Python 2 sort could be implemented
without a cmp() argument to sorted().
----------
nosy: +georg.brandl
priority: -> high
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6945>
_______________________________________
More information about the Python-bugs-list
mailing list