mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
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...)
This commit is contained in:
parent
48450cf0a9
commit
2e24044f9d
2 changed files with 19 additions and 6 deletions
|
@ -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]])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue