[issue6945] pprint.pprint does not pprint unsortable dicts in Python 3

2009-09-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Is it the same as #3976? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6945 ___

[issue6945] pprint.pprint does not pprint unsortable dicts in Python 3

2009-09-20 Thread Armin Ronacher
Armin Ronacher armin.ronac...@active-4.com added the comment: Yes. Appears to be related. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6945 ___

[issue6945] pprint.pprint does not pprint unsortable dicts in Python 3

2009-09-20 Thread Armin Ronacher
Armin Ronacher armin.ronac...@active-4.com added the comment: Duplicate of #3976 -- resolution: - duplicate ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6945 ___

[issue6945] pprint.pprint does not pprint unsortable dicts in Python 3

2009-09-20 Thread Armin Ronacher
Changes by Armin Ronacher armin.ronac...@active-4.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6945 ___ ___

[issue6945] pprint.pprint does not pprint unsortable dicts in Python 3

2009-09-19 Thread Armin Ronacher
New submission from Armin Ronacher armin.ronac...@active-4.com: Currently pprint does not work on dicts it cannot sort. Because in Python 3 sorted(x.items()) is no longer guaranteed to work a new sorting solution has to be found. -- messages: 92862 nosy: aronacher severity: normal

[issue6945] pprint.pprint does not pprint unsortable dicts in Python 3

2009-09-19 Thread Georg Brandl
Georg Brandl ge...@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