From: Raymond Hettinger Date: Mon, 23 Jun 2014 02:45:07 +0000 (-0700) Subject: Display the name not the group itself X-Git-Tag: v2.7.8~25 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=008651c56ecd15e4677f0acde9c285cff1f2904c;p=thirdparty%2FPython%2Fcpython.git Display the name not the group itself --- diff --git a/Lib/sre_parse.py b/Lib/sre_parse.py index 662e49a187b4..0a361abc707b 100644 --- a/Lib/sre_parse.py +++ b/Lib/sre_parse.py @@ -621,7 +621,7 @@ def _parse(source, state): if isname(condname): condgroup = state.groupdict.get(condname) if condgroup is None: - msg = "unknown group name: {0!r}".format(condgroup) + msg = "unknown group name: {0!r}".format(condname) raise error(msg) else: try: