Equality or near equality test for resources.

        Equality means:
        1. same uri, AND
        2. same timestamp WITHIN delta if specified for either, AND
        3. same md5 if specified for both, AND
        4. same length if specified for both

def equal(self, other, delta=0.0):
        """Equality or near equality test for resources.

        Equality means:
        1. same uri, AND
        2. same timestamp WITHIN delta if specified for either, AND
        3. same md5 if specified for both, AND
        4. same length if specified for both
        """
        if (other is None):
            return False
        if (self.uri != other.uri):
            return(False)
        if (self.timestamp is not None or other.timestamp is not None):
            # not equal if only one timestamp specified
            if (self.timestamp is None or
                    other.timestamp is None or
                    abs(self.timestamp - other.timestamp) >= delta):
                return(False)
        if ((self.md5 is not None and other.md5 is not None) and
                self.md5 != other.md5):
            return(False)
        if ((self.length is not None and other.length is not None) and
                self.length != other.length):
            return(False)
        return(True)