'Compare self to other.  Return a decimal value:
a or b is a NaN ==> Decimal(\'NaN\')
a < b           ==> Decimal(\'-1\')
a == b          ==> Decimal(\'0\')
a > b           ==> Decimal(\'1\')'

def compare(self, other, context=None):

    other = _convert_other(other, raiseit=True)
    if (self._is_special or (other and other._is_special)):
        ans = self._check_nans(other, context)
        if ans:
            return ans
    return Decimal(self._cmp(other))
