summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/Lib/re/_parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tools/python3/Lib/re/_parser.py')
-rw-r--r--contrib/tools/python3/Lib/re/_parser.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/tools/python3/Lib/re/_parser.py b/contrib/tools/python3/Lib/re/_parser.py
index 4a492b79e84..f3c779340fe 100644
--- a/contrib/tools/python3/Lib/re/_parser.py
+++ b/contrib/tools/python3/Lib/re/_parser.py
@@ -61,12 +61,11 @@ FLAGS = {
"x": SRE_FLAG_VERBOSE,
# extensions
"a": SRE_FLAG_ASCII,
- "t": SRE_FLAG_TEMPLATE,
"u": SRE_FLAG_UNICODE,
}
TYPE_FLAGS = SRE_FLAG_ASCII | SRE_FLAG_LOCALE | SRE_FLAG_UNICODE
-GLOBAL_FLAGS = SRE_FLAG_DEBUG | SRE_FLAG_TEMPLATE
+GLOBAL_FLAGS = SRE_FLAG_DEBUG
# Maximal value returned by SubPattern.getwidth().
# Must be larger than MAXREPEAT, MAXCODE and sys.maxsize.
@@ -781,8 +780,10 @@ def _parse(source, state, verbose, nested, first=False):
source.tell() - start)
if char == "=":
subpatternappend((ASSERT, (dir, p)))
- else:
+ elif p:
subpatternappend((ASSERT_NOT, (dir, p)))
+ else:
+ subpatternappend((FAILURE, ()))
continue
elif char == "(":