summaryrefslogtreecommitdiffstats
path: root/Lib/tokenize.py
diff options
context:
space:
mode:
authorMeador Inge <meadori@gmail.com>2012-06-17 02:49:08 (GMT)
committerMeador Inge <meadori@gmail.com>2012-06-17 02:49:08 (GMT)
commit8d5c0b8c198374d0b88f30f04dd29d1f19c1c913 (patch)
tree82c76c228a2074c074e58249dc57b05f0d2776ef /Lib/tokenize.py
parent2d9db1dfceeb4e9b2c9572bd1abdbc3bc2b663e5 (diff)
downloadcpython-8d5c0b8c198374d0b88f30f04dd29d1f19c1c913.zip
cpython-8d5c0b8c198374d0b88f30f04dd29d1f19c1c913.tar.gz
cpython-8d5c0b8c198374d0b88f30f04dd29d1f19c1c913.tar.bz2
Issue #15054: Fix incorrect tokenization of 'b' string literals.
Patch by Serhiy Storchaka.
Diffstat (limited to 'Lib/tokenize.py')
-rw-r--r--Lib/tokenize.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/tokenize.py b/Lib/tokenize.py
index e4c9d3c..e41cd6e 100644
--- a/Lib/tokenize.py
+++ b/Lib/tokenize.py
@@ -127,7 +127,7 @@ Floatnumber = group(Pointfloat, Expfloat)
Imagnumber = group(r'[0-9]+[jJ]', Floatnumber + r'[jJ]')
Number = group(Imagnumber, Floatnumber, Intnumber)
-StringPrefix = r'(?:[uU][rR]?|[bB][rR]|[rR][bB]|[rR]|[uU])?'
+StringPrefix = r'(?:[uUbB][rR]?|[rR][bB]?)?'
# Tail end of ' string.
Single = r"[^'\\]*(?:\\.[^'\\]*)*'"