This is the third time I check in this change :-(

Don't use assignments into inst.__dict__ to restore instance
variables; use setattr() instead.
This commit is contained in:
Guido van Rossum 1996-08-08 20:26:45 +00:00
parent 99d90c0d0e
commit abfd8064d8

View file

@ -522,9 +522,8 @@ class Unpickler:
try:
setstate = inst.__setstate__
except AttributeError:
instdict = inst.__dict__
for key in value.keys():
instdict[key] = value[key]
setattr(inst, key, value[key])
else:
setstate(value)
dispatch[BUILD] = load_build