[Python-Dev] doctest improvements
Edward Loper
edloper at gradient.cis.upenn.edu
Mon May 31 23:15:16 EDT 2004
Tim Peters wrote:
> That's more what I had in mind, but if the marker is changed to something
> wordy instead of "a magic character", I don't think the dedent trick is of
> much value anymore:
>
> r"""
> A different marker:
>
> >>> print 'a\n\nb'
> a
> <blank line>
> b
> """
>
> Then when the expected output is (exactly) "<blank line>", doctest would
> accept "<blank line>", or a line with nothing other than whitespace, as a
> match. I can't get upset by that bit of ambiguity.
I had ruled this out because I assumed that any change I made had to
maintain backward compatibility. But if this (minor) incompatibility is
acceptable, then let me know and I'll write up a patch to implement it.
-Edward
More information about the Python-Dev
mailing list