(self, other, context=None)
return Decimal(self._cmp(other))
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')
Compare self to other.  Return a decimal value:
Compare self to other . Return a decimal value :
def compare(self, other, context=None):
        """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')
        """
        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 ) )