[Python-checkins] python/dist/src/Lib doctest.py,1.72,1.73

tim_one at users.sourceforge.net tim_one at users.sourceforge.net
Sun Aug 22 03:47:54 CEST 2004


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24857/Lib

Modified Files:
	doctest.py 
Log Message:
_ellipsis_match():  Removed special-casing of "...\n".  The semantics
are non-obvious either way because the newline character "is invisible",
but it's still there all the same, and it's easier to explain/predict
if that reality is left alone.


Index: doctest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/doctest.py,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- doctest.py	20 Aug 2004 02:08:04 -0000	1.72
+++ doctest.py	22 Aug 2004 01:47:51 -0000	1.73
@@ -398,10 +398,6 @@
     """
     if ELLIPSIS_MARKER not in want:
         return want == got
-    # Remove \n from ...\n, else the newline will be required,
-    # and (for example) ... on a line by itself can't match
-    # nothing gracefully.
-    want = want.replace(ELLIPSIS_MARKER + '\n', ELLIPSIS_MARKER)
 
     # Find "the real" strings.
     ws = want.split(ELLIPSIS_MARKER)



More information about the Python-checkins mailing list