]> granicus.if.org Git - python/commitdiff
Got rid of the _quotes global. Used only once, and is trivial.
authorTim Peters <tim.peters@gmail.com>
Tue, 28 Jan 2003 16:23:33 +0000 (16:23 +0000)
committerTim Peters <tim.peters@gmail.com>
Tue, 28 Jan 2003 16:23:33 +0000 (16:23 +0000)
Lib/pickle.py

index 6045c84044a7c4085ad3e95d310e7861c96f29b9..ad129889b628826adb616769b156154683c529c0 100644 (file)
@@ -156,8 +156,6 @@ _tuplesize2code = [EMPTY_TUPLE, TUPLE1, TUPLE2, TUPLE3]
 __all__.extend([x for x in dir() if re.match("[A-Z][A-Z0-9_]+$",x)])
 del x
 
-_quotes = ["'", '"']
-
 
 # Pickling machinery
 
@@ -826,7 +824,7 @@ class Unpickler:
 
     def load_string(self):
         rep = self.readline()[:-1]
-        for q in _quotes:
+        for q in "\"'": # double or single quote
             if rep.startswith(q):
                 if not rep.endswith(q):
                     raise ValueError, "insecure string pickle"