]> granicus.if.org Git - python/commitdiff
Disable the sub() optimization until Fredrik has time to look into SF
authorGuido van Rossum <guido@python.org>
Fri, 10 Aug 2001 14:56:54 +0000 (14:56 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 10 Aug 2001 14:56:54 +0000 (14:56 +0000)
bug #449000, "re.sub(r'\n', ...) broke".  This was Fredrik's
suggestion -- he's on vacation and said he wouldn't be able to work on
this until next week.

Lib/sre.py

index e6550977fffc8022a3b8bb55ae88515c5ae8b38b..7b79f43d8d62be8593cf9bc9e9759f99dd445449 100644 (file)
@@ -170,6 +170,7 @@ def _subn(pattern, template, text, count=0, sub=0):
     else:
         template = _compile_repl(template, pattern)
         literals = template[1]
+        sub = 0 # temporarly disabled, see bug #449000
         if (sub and not count and pattern._isliteral() and
             len(literals) == 1 and literals[0]):
             # shortcut: both pattern and string are literals