diff options
author | Raymond Hettinger <python@rcn.com> | 2002-06-01 14:18:47 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2002-06-01 14:18:47 (GMT) |
commit | 54f0222547b1e92cd018ef132307a6f793dc9505 (patch) | |
tree | 667480d89feb3f9c7ca44e4ffa7bf39e725c120d /Lib/pickle.py | |
parent | 9d5e4aa4149edb92f6d28c9390d776ae4a1d719a (diff) | |
download | cpython-54f0222547b1e92cd018ef132307a6f793dc9505.zip cpython-54f0222547b1e92cd018ef132307a6f793dc9505.tar.gz cpython-54f0222547b1e92cd018ef132307a6f793dc9505.tar.bz2 |
SF 563203. Replaced 'has_key()' with 'in'.
Diffstat (limited to 'Lib/pickle.py')
-rw-r--r-- | Lib/pickle.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py index 985b851..f29df51 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -206,7 +206,7 @@ class Pickler: self.save_tuple(object) return - if memo.has_key(d): + if d in memo: self.write(self.get(memo[d][0])) return @@ -430,7 +430,7 @@ class Pickler: for element in object: save(element) - if len(object) and memo.has_key(d): + if len(object) and d in memo: if self.bin: write(POP_MARK + self.get(memo[d][0])) return @@ -620,7 +620,7 @@ def whichmodule(cls, clsname): Return a module name. If the class cannot be found, return __main__. """ - if classmap.has_key(cls): + if cls in classmap: return classmap[cls] for name, module in sys.modules.items(): @@ -913,7 +913,7 @@ class Unpickler: del stack[-2:] if type(callable) is not ClassType: - if not safe_constructors.has_key(callable): + if not callable in safe_constructors: try: safe = callable.__safe_for_unpickling__ except AttributeError: |