mirror of
https://github.com/python/cpython.git
synced 2025-09-28 19:25:27 +00:00
Issue #26475: Fixed debugging output for regular expressions with the (?x) flag.
This commit is contained in:
commit
b6bfce6c0b
2 changed files with 6 additions and 3 deletions
|
@ -833,14 +833,14 @@ def parse(str, flags=0, pattern=None):
|
|||
assert source.next == ")"
|
||||
raise source.error("unbalanced parenthesis")
|
||||
|
||||
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):
|
||||
|
|
|
@ -201,6 +201,9 @@ Core and Builtins
|
|||
Library
|
||||
-------
|
||||
|
||||
- Issue #26475: Fixed debugging output for regular expressions with the (?x)
|
||||
flag.
|
||||
|
||||
- Issue #26482: Allowed pickling recursive dequeues.
|
||||
|
||||
- Issue #26335: Make mmap.write() return the number of bytes written like
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue