summaryrefslogtreecommitdiffstats
path: root/Lib/sre_compile.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/sre_compile.py')
-rw-r--r--Lib/sre_compile.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py
index 6c7e588..590e45f 100644
--- a/Lib/sre_compile.py
+++ b/Lib/sre_compile.py
@@ -118,7 +118,7 @@ def _compile(code, pattern, flags):
elif op is AT:
emit(OPCODES[op])
if flags & SRE_FLAG_MULTILINE:
- emit(ATCODES[AT_MULTILINE[av]])
+ emit(ATCODES[AT_MULTILINE.get(av, av)])
else:
emit(ATCODES[av])
elif op is BRANCH:
@@ -203,7 +203,7 @@ def compile(p, flags=0):
if type(p) in (type(""), type(u"")):
import sre_parse
pattern = p
- p = sre_parse.parse(p)
+ p = sre_parse.parse(p, flags)
else:
pattern = None