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
1c99bc84
Commit
1c99bc84
authored
Jun 22, 2014
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #8343: Named group error msgs did not show the group name.
parent
f6f78e1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
Lib/sre_parse.py
Lib/sre_parse.py
+6
-3
No files found.
Lib/sre_parse.py
View file @
1c99bc84
...
...
@@ -616,7 +616,8 @@ def _parse(source, state):
"%r"
%
name
)
gid
=
state
.
groupdict
.
get
(
name
)
if
gid
is
None
:
raise
error
(
"unknown group name"
)
msg
=
"unknown group name: {0!r}"
.
format
(
name
)
raise
error
(
msg
)
subpatternappend
((
GROUPREF
,
gid
))
continue
else
:
...
...
@@ -669,7 +670,8 @@ def _parse(source, state):
if
condname
.
isidentifier
():
condgroup
=
state
.
groupdict
.
get
(
condname
)
if
condgroup
is
None
:
raise
error
(
"unknown group name"
)
msg
=
"unknown group name: {0!r}"
.
format
(
condname
)
raise
error
(
msg
)
else
:
try
:
condgroup
=
int
(
condname
)
...
...
@@ -806,7 +808,8 @@ def parse_template(source, pattern):
try
:
index
=
pattern
.
groupindex
[
name
]
except
KeyError
:
raise
IndexError
(
"unknown group name"
)
msg
=
"unknown group name: {0!r}"
.
format
(
name
)
raise
IndexError
(
msg
)
addgroup
(
index
)
elif
c
==
"0"
:
if
s
.
next
in
OCTDIGITS
:
...
...
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