summaryrefslogtreecommitdiff
path: root/Lib/sre_compile.py
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2001-01-15 18:28:14 +0000
committerFredrik Lundh <fredrik@pythonware.com>2001-01-15 18:28:14 +0000
commit2e24044f9db23c3d2195a129f53f2deb73a4e4af (patch)
treede28bfff15ec4e425623b183af044396d025dd4b /Lib/sre_compile.py
parent48450cf0a94765c010eddfbbfc5c85380e6a9a15 (diff)
downloadcpython-git-2e24044f9db23c3d2195a129f53f2deb73a4e4af.tar.gz
from the really-stupid-bug department: uppercase literals should match
uppercase strings also when the IGNORECASE flag is set (bug #128899) (also added test cases for recently fixed bugs to the regression suite -- or in other words, check in re_tests.py too...)
Diffstat (limited to 'Lib/sre_compile.py')
-rw-r--r--Lib/sre_compile.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py
index c2996fc3a2..ab2a2cc9ad 100644
--- a/Lib/sre_compile.py
+++ b/Lib/sre_compile.py
@@ -23,9 +23,10 @@ def _compile(code, pattern, flags):
if op in (LITERAL, NOT_LITERAL):
if flags & SRE_FLAG_IGNORECASE:
emit(OPCODES[OP_IGNORE[op]])
+ emit(_sre.getlower(av, flags))
else:
emit(OPCODES[op])
- emit(av)
+ emit(av)
elif op is IN:
if flags & SRE_FLAG_IGNORECASE:
emit(OPCODES[OP_IGNORE[op]])