ISTR that when Tim Peters first implemented first, the typical way you were expected to get tests into a doc string was to copy from an interactive session, which would not have this problem.
Also, to Steven's comment about fussiness, it isn't so much that it's fussy. It's more that it's dumb. I just does a simple string comparison of the expected and actual outputs. It would be impossible for doctest to know whether the expected output was something like repr or str output, and thus safe to exchange single for double (don't forget to escape other embedded quotes!), or was some sort of user-generated string, perhaps intended to be text in another programming language which has different quoting rules than Python. Therefore, fussy (or dumb) is exactly what you want. I-said-what-I-meant-ly y'rs, Skip
-- https://mail.python.org/mailman/listinfo/python-list