'x.__hash__() <==> hash(x)'

def __hash__(self):

    if self._is_special:
        if self._isnan():
            raise TypeError('Cannot    hash    a    NaN    value.')
        return hash(str(self))
    i = int(self)
    if (self == Decimal(i)):
        return hash(i)
    assert self.__nonzero__()
    return hash(str(self.normalize()))
