summaryrefslogtreecommitdiffstats
path: root/Lib/sre_compile.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-08-19 20:19:49 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-08-19 20:19:49 (GMT)
commit228c194596b8e357ae586a76ee392740107bd663 (patch)
tree5254ce79c68d6edbc4da2dc2a071064737d14a9d /Lib/sre_compile.py
parent75674ae8ddc9ab83200919de6f75ead695be9bcb (diff)
parent98985a1980304b3c8fee9b9efdac015c6098bd67 (diff)
downloadcpython-228c194596b8e357ae586a76ee392740107bd663.zip
cpython-228c194596b8e357ae586a76ee392740107bd663.tar.gz
cpython-228c194596b8e357ae586a76ee392740107bd663.tar.bz2
Issue #2537: Remove breaked check which prevented valid regular expressions.
Patch by Meador Inge. See also issue #18647.
Diffstat (limited to 'Lib/sre_compile.py')
-rw-r--r--Lib/sre_compile.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py
index 429d779..d6dc60c 100644
--- a/Lib/sre_compile.py
+++ b/Lib/sre_compile.py
@@ -351,8 +351,6 @@ def _optimize_unicode(charset, fixup):
def _simple(av):
# check if av is a "simple" operator
lo, hi = av[2].getwidth()
- #if lo == 0 and hi == MAXREPEAT:
- # raise error("nothing to repeat")
return lo == hi == 1 and av[2][0][0] != SUBPATTERN
def _compile_info(code, pattern, flags):