summaryrefslogtreecommitdiff
path: root/Lib/sre_constants.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-04-14 17:59:34 +0000
committerGuido van Rossum <guido@python.org>2003-04-14 17:59:34 +0000
commit41c99e7f96f7a0f192839801c568d8a80dcc7091 (patch)
tree5733d278d932546d0b642dce7e631512da483f76 /Lib/sre_constants.py
parent44c62ef5ee2d48cfa0bd024507f19e47d987e6b3 (diff)
downloadcpython-git-41c99e7f96f7a0f192839801c568d8a80dcc7091.tar.gz
SF patch #720991 by Gary Herron:
A small fix for bug #545855 and Greg Chapman's addition of op code SRE_OP_MIN_REPEAT_ONE for eliminating recursion on simple uses of pattern '*?' on a long string.
Diffstat (limited to 'Lib/sre_constants.py')
-rw-r--r--Lib/sre_constants.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/sre_constants.py b/Lib/sre_constants.py
index b0b61d91bf..2cd85a39f9 100644
--- a/Lib/sre_constants.py
+++ b/Lib/sre_constants.py
@@ -60,6 +60,7 @@ RANGE = "range"
REPEAT = "repeat"
REPEAT_ONE = "repeat_one"
SUBPATTERN = "subpattern"
+MIN_REPEAT_ONE = "min_repeat_one"
# positions
AT_BEGINNING = "at_beginning"
@@ -120,7 +121,8 @@ OPCODES = [
RANGE,
REPEAT,
REPEAT_ONE,
- SUBPATTERN
+ SUBPATTERN,
+ MIN_REPEAT_ONE
]