From 008651c56ecd15e4677f0acde9c285cff1f2904c Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Sun, 22 Jun 2014 19:45:07 -0700 Subject: [PATCH] Display the name not the group itself --- Lib/sre_parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/sre_parse.py b/Lib/sre_parse.py index 662e49a187..0a361abc70 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: -- 2.50.1