Custom instance unpickling in Python: should the object dictionary be updated, or is replacing it OK?
When defining how objects of a certain class should be unpickled, via __setstate__, I gather that it is safe to do def __setstate__(self, dict_returned_by_pickle): self.__dict__.update(dict_returned_by_pickle) when the pickled state is a dictionary. This is what I have seen in an answer here on stackoverflow. However, is this a ...