diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-08-20 02:08:04 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-08-20 02:08:04 (GMT) |
commit | b0a04e15921433159392aaa465db9581107e11f7 (patch) | |
tree | 5093d4be8e32176389deb598e8f7228332141bb2 | |
parent | 525b315326665520de660b0e06c6c6ec9a92aaa0 (diff) | |
download | cpython-b0a04e15921433159392aaa465db9581107e11f7.zip cpython-b0a04e15921433159392aaa465db9581107e11f7.tar.gz cpython-b0a04e15921433159392aaa465db9581107e11f7.tar.bz2 |
Gave _ellipsis_match() an attractive new leading underscore.
-rw-r--r-- | Lib/doctest.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py index 311469f..6e6661d 100644 --- a/Lib/doctest.py +++ b/Lib/doctest.py @@ -390,10 +390,10 @@ class _SpoofOut(StringIO): del self.softspace # Worst-case linear-time ellipsis matching. -def ellipsis_match(want, got): +def _ellipsis_match(want, got): """ Essentially the only subtle case: - >>> ellipsis_match('aa...aa', 'aaa') + >>> _ellipsis_match('aa...aa', 'aaa') False """ if ELLIPSIS_MARKER not in want: @@ -426,7 +426,7 @@ def ellipsis_match(want, got): if startpos > endpos: # Exact end matches required more characters than we have, as in - # ellipsis_match('aa...aa', 'aaa') + # _ellipsis_match('aa...aa', 'aaa') return False # For the rest, we only need to find the leftmost non-overlapping @@ -1558,7 +1558,7 @@ class OutputChecker: # The ELLIPSIS flag says to let the sequence "..." in `want` # match any substring in `got`. if optionflags & ELLIPSIS: - if ellipsis_match(want, got): + if _ellipsis_match(want, got): return True # We didn't find any match; return false. |