def __setstate__(self, dct): self.__dict__.update(dct) # recursively change type in-place try: ht_dist2.bless(self.template) except ValueError, e: if 'what to do with this?' not in str(e): raise
def __setstate__(self, dct): self.__dict__.update(dct) # recursively change type in-place if 'template' in dct: ht_dist2.bless(self.template)