summaryrefslogtreecommitdiffstats
path: root/Lib/pre.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/pre.py')
-rw-r--r--Lib/pre.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/pre.py b/Lib/pre.py
index b6dd09b..60db913 100644
--- a/Lib/pre.py
+++ b/Lib/pre.py
@@ -544,7 +544,7 @@ class MatchObject:
try:
g = self.re.groupindex[g]
except (KeyError, TypeError):
- raise IndexError, 'group %s is undefined' % `g`
+ raise IndexError, 'group %r is undefined' % (g,)
return self.regs[g][0]
def end(self, g = 0):
@@ -560,7 +560,7 @@ class MatchObject:
try:
g = self.re.groupindex[g]
except (KeyError, TypeError):
- raise IndexError, 'group %s is undefined' % `g`
+ raise IndexError, 'group %r is undefined' % (g,)
return self.regs[g][1]
def span(self, g = 0):
@@ -576,7 +576,7 @@ class MatchObject:
try:
g = self.re.groupindex[g]
except (KeyError, TypeError):
- raise IndexError, 'group %s is undefined' % `g`
+ raise IndexError, 'group %r is undefined' % (g,)
return self.regs[g]
def groups(self, default=None):
@@ -629,9 +629,9 @@ class MatchObject:
try:
g = self.re.groupindex[g]
except (KeyError, TypeError):
- raise IndexError, 'group %s is undefined' % `g`
+ raise IndexError, 'group %r is undefined' % (g,)
if g >= len(self.regs):
- raise IndexError, 'group %s is undefined' % `g`
+ raise IndexError, 'group %r is undefined' % (g,)
a, b = self.regs[g]
if a == -1 or b == -1:
result.append(None)