'On unpickling a key object, the key data is converted to the big
number representation being used, whether that is Python long
integers, MPZ objects, or whatever.'

def __setstate__(self, d):

    for key in self.keydata:
        if d.has_key(key):
            self.__dict__[key] = bignum(d[key])
