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
d65cd091
Commit
d65cd091
authored
Sep 11, 2016
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #28070: Fixed parsing inline verbose flag in regular expressions.
parent
99a65702
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
0 deletions
+6
-0
Lib/sre_parse.py
Lib/sre_parse.py
+1
-0
Lib/test/test_re.py
Lib/test/test_re.py
+3
-0
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/sre_parse.py
View file @
d65cd091
...
...
@@ -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
)
...
...
Lib/test/test_re.py
View file @
d65cd091
...
...
@@ -1276,6 +1276,9 @@ class ReTests(unittest.TestCase):
q = p.match(upper_char)
self.assertTrue(q)
self.assertTrue(re.match('(?ixu) ' + upper_char, lower_char))
self.assertTrue(re.match('(?ixu) ' + lower_char, upper_char))
def test_dollar_matches_twice(self):
"
$
matches
the
end
of
string
,
and
just
before
the
terminating
\
n
"
pattern = re.compile('$')
...
...
Misc/NEWS
View file @
d65cd091
...
...
@@ -138,6 +138,8 @@ Core and Builtins
Library
-------
-
Issue
#
28070
:
Fixed
parsing
inline
verbose
flag
in
regular
expressions
.
-
Issue
#
19500
:
Add
client
-
side
SSL
session
resumption
to
the
ssl
module
.
-
Issue
#
28022
:
Deprecate
ssl
-
related
arguments
in
favor
of
SSLContext
.
The
...
...
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