diff options
-rw-r--r-- | Lib/pickle.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py index 97eb4e4..7458792 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -843,8 +843,7 @@ class Unpickler: try: setstate = inst.__setstate__ except AttributeError: - for key in value.keys(): - setattr(inst, key, value[key]) + inst.__dict__.update(value) else: setstate(value) dispatch[BUILD] = load_build |