Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a61bfdbe
Commit
a61bfdbe
authored
Mar 06, 2016
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #26475: Fixed debugging output for regular expressions with the (?x) flag.
parent
7c033e60
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
Lib/sre_parse.py
Lib/sre_parse.py
+3
-3
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/sre_parse.py
View file @
a61bfdbe
...
@@ -721,14 +721,14 @@ def parse(str, flags=0, pattern=None):
...
@@ -721,14 +721,14 @@ def parse(str, flags=0, pattern=None):
elif
tail
:
elif
tail
:
raise
error
,
"bogus characters at end of regular expression"
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
:
if
not
(
flags
&
SRE_FLAG_VERBOSE
)
and
p
.
pattern
.
flags
&
SRE_FLAG_VERBOSE
:
# the VERBOSE flag was switched on inside the pattern. to be
# the VERBOSE flag was switched on inside the pattern. to be
# on the safe side, we'll parse the whole thing again...
# on the safe side, we'll parse the whole thing again...
return
parse
(
str
,
p
.
pattern
.
flags
)
return
parse
(
str
,
p
.
pattern
.
flags
)
if
flags
&
SRE_FLAG_DEBUG
:
p
.
dump
()
return
p
return
p
def
parse_template
(
source
,
pattern
):
def
parse_template
(
source
,
pattern
):
...
...
Misc/NEWS
View file @
a61bfdbe
...
@@ -55,6 +55,9 @@ Core and Builtins
...
@@ -55,6 +55,9 @@ Core and Builtins
Library
Library
-------
-------
-
Issue
#
26475
:
Fixed
debugging
output
for
regular
expressions
with
the
(?
x
)
flag
.
-
Issue
#
26385
:
Remove
the
file
if
the
internal
fdopen
()
call
in
-
Issue
#
26385
:
Remove
the
file
if
the
internal
fdopen
()
call
in
NamedTemporaryFile
()
fails
.
Based
on
patch
by
Silent
Ghost
.
NamedTemporaryFile
()
fails
.
Based
on
patch
by
Silent
Ghost
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment