Joachim Jablon <ewjoac...@gmail.com> added the comment:

If you stop sorting keys in pprint, then unittest.TestCase.assertDictEquals() 
(and pytest and such) won't be able to generate a meaningful diff when 2 dicts 
aren't equal, and it will be much more complicated to understand why a test 
fails.

https://github.com/python/cpython/blob/89427cd0feae25bbc8693abdccfa6a8c81a2689c/Lib/unittest/case.py#L1172-L1175

(well except if we fix unittest, but then external test runners will need 
fixing too, and it might not be the only place diff is used on the result of 
pprint to see how two objects differ)

----------
nosy: +ewjoachim

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue30670>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to