diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-10-31 10:36:56 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-10-31 10:36:56 (GMT) |
commit | 4b8f8949b43715f1b0f0ef77e15e19c180ccc195 (patch) | |
tree | bebc1eda94d11692278f03c41c683b5b8ca815dd /Lib/sre_constants.py | |
parent | 455de40a6e99ad7548e6061733f9c5dae2327e83 (diff) | |
download | cpython-4b8f8949b43715f1b0f0ef77e15e19c180ccc195.zip cpython-4b8f8949b43715f1b0f0ef77e15e19c180ccc195.tar.gz cpython-4b8f8949b43715f1b0f0ef77e15e19c180ccc195.tar.bz2 |
Issue #17381: Fixed handling of case-insensitive ranges in regular expressions.
Added new opcode RANGE_IGNORE.
Diffstat (limited to 'Lib/sre_constants.py')
-rw-r--r-- | Lib/sre_constants.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/sre_constants.py b/Lib/sre_constants.py index 8815d1d..8296ecd 100644 --- a/Lib/sre_constants.py +++ b/Lib/sre_constants.py @@ -13,7 +13,7 @@ # update when constants are added or removed -MAGIC = 20031017 +MAGIC = 20140917 from _sre import MAXREPEAT, MAXGROUPS @@ -56,6 +56,7 @@ NEGATE = "negate" NOT_LITERAL = "not_literal" NOT_LITERAL_IGNORE = "not_literal_ignore" RANGE = "range" +RANGE_IGNORE = "range_ignore" REPEAT = "repeat" REPEAT_ONE = "repeat_one" SUBPATTERN = "subpattern" @@ -121,7 +122,8 @@ OPCODES = [ REPEAT, REPEAT_ONE, SUBPATTERN, - MIN_REPEAT_ONE + MIN_REPEAT_ONE, + RANGE_IGNORE, ] @@ -159,7 +161,8 @@ OP_IGNORE = { GROUPREF: GROUPREF_IGNORE, IN: IN_IGNORE, LITERAL: LITERAL_IGNORE, - NOT_LITERAL: NOT_LITERAL_IGNORE + NOT_LITERAL: NOT_LITERAL_IGNORE, + RANGE: RANGE_IGNORE, } AT_MULTILINE = { |