mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Disable the sub() optimization until Fredrik has time to look into SF
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.
This commit is contained in:
parent
e056e4d15c
commit
315cd29ecf
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue