(self, other, context=None)
return Decimal(self._cmp(other))
Compares one to another.

        -1 => a < b
        0  => a = b
        1  => a > b
        NaN => one is NaN
        Like __cmp__, but returns Decimal instances.
Compares one to another.
Compares one to another .
def compare(self, other, context=None):
        """Compares one to another.

        -1 => a < b
        0  => a = b
        1  => a > b
        NaN => one is NaN
        Like __cmp__, but returns Decimal instances.
        """
        other = _convert_other(other, raiseit=True)

        # Compare(NaN, NaN) = NaN
        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))
def compare ( self , other , context = None ) : other = _convert_other ( other , raiseit = True ) # Compare(NaN, NaN) = NaN 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 ) )