mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #28070: Fixed parsing inline verbose flag in regular expressions.
This commit is contained in:
parent
99a6570295
commit
d65cd091e9
3 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue