[Python-checkins] cpython (merge 3.3 -> default): Issue #18647: A regular expression in the doctest module rewritten so that

serhiy.storchaka python-checkins at python.org
Mon Aug 19 22:30:30 CEST 2013


http://hg.python.org/cpython/rev/8b24818c7327
changeset:   85272:8b24818c7327
parent:      85269:e47f2dc564bc
parent:      85271:19ed2fbb8e6b
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Mon Aug 19 23:04:33 2013 +0300
summary:
  Issue #18647: A regular expression in the doctest module rewritten so that
determined minimal width of repeated subexpression is >0 (an empty line was
not matched in any case).

files:
  Lib/doctest.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/doctest.py b/Lib/doctest.py
--- a/Lib/doctest.py
+++ b/Lib/doctest.py
@@ -557,7 +557,7 @@
         # Want consists of any non-blank lines that do not start with PS1.
         (?P<want> (?:(?![ ]*$)    # Not a blank line
                      (?![ ]*>>>)  # Not a line starting with PS1
-                     .*$\n?       # But any other line
+                     .+$\n?       # But any other line
                   )*)
         ''', re.MULTILINE | re.VERBOSE)
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list