diff options
author | Tim Peters <tim.peters@gmail.com> | 2003-01-28 16:23:33 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2003-01-28 16:23:33 (GMT) |
commit | ad5a771fae4785c127173aa2e4fc92806cc8a81a (patch) | |
tree | f067f7b1c37134867112eab67a668d7a60d2167c /Lib | |
parent | 55762f5f804c4848bbce323b085101d450f89ff6 (diff) | |
download | cpython-ad5a771fae4785c127173aa2e4fc92806cc8a81a.zip cpython-ad5a771fae4785c127173aa2e4fc92806cc8a81a.tar.gz cpython-ad5a771fae4785c127173aa2e4fc92806cc8a81a.tar.bz2 |
Got rid of the _quotes global. Used only once, and is trivial.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/pickle.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py index 6045c84..ad12988 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -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" |