Kaydet (Commit) a61bfdbe authored tarafından Serhiy Storchaka's avatar Serhiy Storchaka

Issue #26475: Fixed debugging output for regular expressions with the (?x) flag.

üst 7c033e60
......@@ -721,14 +721,14 @@ def parse(str, flags=0, pattern=None):
elif tail:
raise error, "bogus characters at end of regular expression"
if flags & SRE_FLAG_DEBUG:
p.dump()
if not (flags & SRE_FLAG_VERBOSE) and p.pattern.flags & SRE_FLAG_VERBOSE:
# the VERBOSE flag was switched on inside the pattern. to be
# on the safe side, we'll parse the whole thing again...
return parse(str, p.pattern.flags)
if flags & SRE_FLAG_DEBUG:
p.dump()
return p
def parse_template(source, pattern):
......
......@@ -55,6 +55,9 @@ Core and Builtins
Library
-------
- Issue #26475: Fixed debugging output for regular expressions with the (?x)
flag.
- Issue #26385: Remove the file if the internal fdopen() call in
NamedTemporaryFile() fails. Based on patch by Silent Ghost.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment