From 3972628de3d569c88451a2a176a1c94d8822b8a6 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Thu, 18 May 2017 07:35:54 -0700 Subject: bpo-30296 Remove unnecessary tuples, lists, sets, and dicts (#1489) * Replaced list() with list comprehension * Replaced dict() with dict comprehension * Replaced set() with set literal * Replaced builtin func() with func() when supported (e.g. any(), all(), tuple(), min(), & max()) --- Lib/tokenize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/tokenize.py') diff --git a/Lib/tokenize.py b/Lib/tokenize.py index eea88b7d43..634662da26 100644 --- a/Lib/tokenize.py +++ b/Lib/tokenize.py @@ -142,7 +142,7 @@ def _all_string_prefixes(): # 'rf'). The various permutations will be generated. _valid_string_prefixes = ['b', 'r', 'u', 'f', 'br', 'fr'] # if we add binary f-strings, add: ['fb', 'fbr'] - result = set(['']) + result = {''} for prefix in _valid_string_prefixes: for t in _itertools.permutations(prefix): # create a list with upper and lower versions of each -- cgit v1.2.1