diff options
author | Christian Heimes <c.heimes@cheimes.de> | 2012-06-20 11:17:58 +0200 |
---|---|---|
committer | Christian Heimes <c.heimes@cheimes.de> | 2012-06-20 11:17:58 +0200 |
commit | 0b3847de6dbe451d38d8de940717a5a1f186c2e9 (patch) | |
tree | 62f54dd84693e7b25deae94699b8c240d824b806 /Lib/tokenize.py | |
parent | Fix GzipFile's handling of filenames given as bytes objects. (diff) | |
download | cpython-0b3847de6dbe451d38d8de940717a5a1f186c2e9.tar.gz cpython-0b3847de6dbe451d38d8de940717a5a1f186c2e9.tar.bz2 cpython-0b3847de6dbe451d38d8de940717a5a1f186c2e9.zip |
Issue #15096: Drop support for the ur string prefix
Diffstat (limited to 'Lib/tokenize.py')
-rw-r--r-- | Lib/tokenize.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Lib/tokenize.py b/Lib/tokenize.py index e41cd6eea42..0a53435583a 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'(?:[uUbB][rR]?|[rR][bB]?)?' +StringPrefix = r'(?:[bB][rR]?|[rR][bB]?|[uU])?' # Tail end of ' string. Single = r"[^'\\]*(?:\\.[^'\\]*)*'" @@ -183,12 +183,8 @@ endpats = {"'": Single, '"': Double, "rB'''": Single3, 'rB"""': Double3, "RB'''": Single3, 'RB"""': Double3, "u'''": Single3, 'u"""': Double3, - "ur'''": Single3, 'ur"""': Double3, "R'''": Single3, 'R"""': Double3, "U'''": Single3, 'U"""': Double3, - "uR'''": Single3, 'uR"""': Double3, - "Ur'''": Single3, 'Ur"""': Double3, - "UR'''": Single3, 'UR"""': Double3, 'r': None, 'R': None, 'b': None, 'B': None, 'u': None, 'U': None} @@ -201,8 +197,7 @@ for t in ("'''", '"""', "rb'''", 'rb"""', "rB'''", 'rB"""', "Rb'''", 'Rb"""', "RB'''", 'RB"""', "u'''", 'u"""', "U'''", 'U"""', - "ur'''", 'ur"""', "Ur'''", 'Ur"""', - "uR'''", 'uR"""', "UR'''", 'UR"""'): + ): triple_quoted[t] = t single_quoted = {} for t in ("'", '"', @@ -213,8 +208,7 @@ for t in ("'", '"', "rb'", 'rb"', "rB'", 'rB"', "Rb'", 'Rb"', "RB'", 'RB"' , "u'", 'u"', "U'", 'U"', - "ur'", 'ur"', "Ur'", 'Ur"', - "uR'", 'uR"', "UR'", 'UR"' ): + ): single_quoted[t] = t tabsize = 8 |