Can I ask a possibly silly question?
As I understand it, doctest takes a small snippet of code, runs it,
and compares the resulting string with a string in the document.
This thread seems to be centered around making comparisons of results
with indeterminate ordering (dicts being the prime example) work
properly. In fact, one proposal was to have doctest call sorted on the
output to make sure it's right, which was shot down because that's not
always the correct thing to do.
So the question is - why isn't dealing with this the responsibility of
the test writer? Yeah, it's not quite the spirit of documentation to
turn a dictionary into a sorted list in the output, but neither is
littering the documentation with +LITERAL_EVAL and the like.