[issue20310] Recommend using pprint for deterministic doctest

2014-01-20 Thread R. David Murray
R. David Murray added the comment: That's a very good point. You'd think I'd have thought of it since I mentioned that it had changed in 3.4. And it will most likely change more in future versions. -- resolution: -> rejected stage: -> committed/rejected status: open -> closed

[issue20310] Recommend using pprint for deterministic doctest

2014-01-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: That's a rather bad idea. pprint output isn't supposed to be identical accross versions; actually, it has recently changed in some cases. -- nosy: +pitrou ___ Python tracker _

[issue20310] Recommend using pprint for deterministic doctest

2014-01-20 Thread R. David Murray
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

[issue20310] Recommend using pprint for deterministic doctest

2014-01-19 Thread Charles-Axel Dein
New submission from Charles-Axel Dein: I just thought that using pprint.pprint was an elegant solution to the non-deterministic order of repr(dict) in doctest. See for instance http://bugs.python.org/issue3332 Contrary to sorted(foo().items()): - It provides a nice output that is exactly like