This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ewjoachim
Recipients Aaron Hall, Jan-Hein Bührman, Valentin Beyer, ewjoachim, josephsmeng, pombredanne, remi.lapeyre, rhettinger, serhiy.storchaka, xtreak
Date 2019-02-04.21:57:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
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)
History
Date User Action Args
2019-02-04 21:57:49ewjoachimsetrecipients: + ewjoachim, rhettinger, serhiy.storchaka, josephsmeng, pombredanne, Aaron Hall, remi.lapeyre, xtreak, Jan-Hein Bührman, Valentin Beyer
2019-02-04 21:57:48ewjoachimsetmessageid: <[email protected]>
2019-02-04 21:57:48ewjoachimlinkissue30670 messages
2019-02-04 21:57:48ewjoachimcreate