]> granicus.if.org Git - python/commitdiff
Substitute a more readable f-string
authorRaymond Hettinger <python@rcn.com>
Mon, 6 Feb 2017 15:15:31 +0000 (07:15 -0800)
committerRaymond Hettinger <python@rcn.com>
Mon, 6 Feb 2017 15:15:31 +0000 (07:15 -0800)
Doc/library/re.rst

index 7ef4cbeee799eae2b9cd07f7ca563b7144839a1b..fe5ebcc67c840b63b25753610bd60ecf5d3b7b08 100644 (file)
@@ -1465,7 +1465,7 @@ successive matches::
             elif kind == 'SKIP':
                 pass
             elif kind == 'MISMATCH':
-                raise RuntimeError('%r unexpected on line %d' % (value, line_num))
+                raise RuntimeError(f'{value!r} unexpected on line {line_num}')
             else:
                 if kind == 'ID' and value in keywords:
                     kind = value