summaryrefslogtreecommitdiffstats
path: root/Lib/sre_parse.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-09-10 22:39:01 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-09-10 22:39:01 (GMT)
commitd65cd091e9c10cd55c3e19c45930c539d896c61a (patch)
treed27d2304f4ce428fffa4106949f974ae31f349a2 /Lib/sre_parse.py
parent99a6570295de5684bfac767b4d35c72f8f36612d (diff)
downloadcpython-d65cd091e9c10cd55c3e19c45930c539d896c61a.zip
cpython-d65cd091e9c10cd55c3e19c45930c539d896c61a.tar.gz
cpython-d65cd091e9c10cd55c3e19c45930c539d896c61a.tar.bz2
Issue #28070: Fixed parsing inline verbose flag in regular expressions.
Diffstat (limited to 'Lib/sre_parse.py')
-rw-r--r--Lib/sre_parse.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/sre_parse.py b/Lib/sre_parse.py
index 09f3be2..d74e93f 100644
--- a/Lib/sre_parse.py
+++ b/Lib/sre_parse.py
@@ -847,6 +847,7 @@ def parse(str, flags=0, pattern=None):
pattern = Pattern()
pattern.flags = flags | SRE_FLAG_VERBOSE
pattern.str = str
+ source.seek(0)
p = _parse_sub(source, pattern, True, False)
p.pattern.flags = fix_flags(str, p.pattern.flags)