'A loose equality method for UrlParsers.
In particular, this returns true for UrlParsers whose resultant urls
have the same query parameters, but in a different order.  These are
treated the same most of the time, but if you need strict equality,
compare the string results of unparse().'

def __eq__(self, other):

    if (not isinstance(other, UrlParser)):
        return False
    (s_scheme, s_netloc, s_path, s_params, s_query, s_fragment) = self._unparse()
    (o_scheme, o_netloc, o_path, o_params, o_query, o_fragment) = other._unparse()
    if ((s_scheme != o_scheme) or (s_netloc != o_netloc) or (s_path != o_path) or (s_params != o_params) or (s_fragment != o_fragment)):
        return False
    if (dict(self.query_dict) != dict(other.query_dict)):
        return False
    return True
