[Python-checkins] cpython (merge 3.4 -> default): merge
raymond.hettinger
python-checkins at python.org
Mon Jun 23 04:48:03 CEST 2014
http://hg.python.org/cpython/rev/8e3ef955dbc3
changeset: 91344:8e3ef955dbc3
parent: 91339:81529993f60d
parent: 91343:404dcd29b0a6
user: Raymond Hettinger <python at rcn.com>
date: Sun Jun 22 19:47:55 2014 -0700
summary:
merge
files:
Lib/sre_parse.py | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/Lib/sre_parse.py b/Lib/sre_parse.py
--- a/Lib/sre_parse.py
+++ b/Lib/sre_parse.py
@@ -616,7 +616,8 @@
"%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 @@
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 @@
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:
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list