On Thu, Mar 1, 2012 at 8:31 PM, Guido van Rossum
<guido@python.org> wrote:
> I just thought of something: isn't the obvious solution is for doctest to
> test the type of an expression's output and if it's in the set of unordered
> types {set, dict} to run sort() on it? Then the docstring author can just
> put the (sorted) output of what's expected....
What if the output is a list of dicts?
Right, thanks. Although I suppose in theory one could go deep -- take the deepcopy code and instead of an exact copy replace any unordered types with their sorted copies.
mark.