Joe Strout: > What's the standard solution for this? I don't know of any standard solution, I generally sort the items in some ways, or add the result, that has to be equal: >>> r = foo() >>> r == {'object': 'rain', 'location': 'Spain', 'subloc': 'train'} True
> Does doctest have some special way to tell it to consider the result > as a dictionary rather than a string? Or something else? A more general solution like this for sets/dics may become useful... do you have any idea regarding how to design it? Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list