(self, other)
return tuple(self) == tuple(other_ref)
Compare this reference to another.
Compare this reference to another.
Compare this reference to another .
def __eq__(self, other):
        """Compare this reference to another."""
        other_ref = other
        if isinstance(other, tuple):
            other_ref = self.__class__(*other)
        elif not isinstance(other, IRIReference):
            try:
                other_ref = self.__class__.from_string(other)
            except TypeError:
                raise TypeError(
                    'Unable to compare {0}() to {1}()'.format(
                        type(self).__name__, type(other).__name__))

        # See http://tools.ietf.org/html/rfc3986#section-6.2
        return tuple(self) == tuple(other_ref)
def __eq__ ( self , other ) : other_ref = other if isinstance ( other , tuple ) : other_ref = self . __class__ ( * other ) elif not isinstance ( other , IRIReference ) : try : other_ref = self . __class__ . from_string ( other ) except TypeError : raise TypeError ( 'Unable to compare {0}() to {1}()' . format ( type ( self ) . __name__ , type ( other ) . __name__ ) ) # See http://tools.ietf.org/html/rfc3986#section-6.2 return tuple ( self ) == tuple ( other_ref )