(self, rhs)
return self._buffer == rhs._buffer
Equals.
Equals.
Equals .
def eq(self, rhs):
        """Equals."""
        if isinstance(rhs, Integer):
            # upgrade rhs to Float
            return self.eq(self.new().from_integer(rhs))
        elif isinstance(rhs, Double) and isinstance(self, Single):
            # upgrade to Double
            return Double(None, self._values).from_single(self).eq(rhs)
        # all zeroes are equal
        if self.is_zero():
            return rhs.is_zero()
        return self._buffer == rhs._buffer
def eq ( self , rhs ) : if isinstance ( rhs , Integer ) : # upgrade rhs to Float return self . eq ( self . new ( ) . from_integer ( rhs ) ) elif isinstance ( rhs , Double ) and isinstance ( self , Single ) : # upgrade to Double return Double ( None , self . _values ) . from_single ( self ) . eq ( rhs ) # all zeroes are equal if self . is_zero ( ) : return rhs . is_zero ( ) return self . _buffer == rhs . _buffer