summaryrefslogtreecommitdiff
path: root/Lib/sre_parse.py
diff options
context:
space:
mode:
authorRoy Williams <roy.williams.iii@gmail.com>2017-06-09 22:01:16 -0700
committerSerhiy Storchaka <storchaka@gmail.com>2017-06-10 08:01:16 +0300
commit171b9a354e816eebc6d4c3a8553303942e9c5025 (patch)
treedd1dcb26b3b064b7c0bd08e79771e6193c9c8759 /Lib/sre_parse.py
parent7445381c606faf20e253da42656db478a4349f8e (diff)
downloadcpython-git-171b9a354e816eebc6d4c3a8553303942e9c5025.tar.gz
bpo-30605: Fix compiling binary regexs with BytesWarnings enabled. (#2016)
Running our unit tests with `-bb` enabled triggered this failure.
Diffstat (limited to 'Lib/sre_parse.py')
-rw-r--r--Lib/sre_parse.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/sre_parse.py b/Lib/sre_parse.py
index d59d642e64..545252074f 100644
--- a/Lib/sre_parse.py
+++ b/Lib/sre_parse.py
@@ -765,7 +765,7 @@ def _parse(source, state, verbose, nested, first=False):
if not first or subpattern:
import warnings
warnings.warn(
- 'Flags not at the start of the expression %s%s' % (
+ 'Flags not at the start of the expression %r%s' % (
source.string[:20], # truncate long regexes
' (truncated)' if len(source.string) > 20 else '',
),