[issue20310] Recommend using pprint for deterministic doctest
R. David Murray
report at bugs.python.org
Mon Jan 20 16:52:53 CET 2014
R. David Murray added the comment:
I think suggesting pprint is a great idea. It also has another advantage in 3.4: in many cases it should produce output that is line wrapped such that NORMALIZE_WHITESPACE isn't needed.
However, I'd make it as an *additional* suggestion. Pedagogically, sort makes it clear that you *must* resolve the problem of the ordering of dict items...then you can suggest pprint as something that also sorts, and has some additional nice properties as well.
----------
nosy: +r.david.murray
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20310>
_______________________________________
More information about the Python-bugs-list
mailing list