':param other:
The other Primitive to compare to
:return:
A boolean'

def __eq__(self, other):

    if (not isinstance(other, Primitive)):
        return False
    if (self.contents != other.contents):
        return False
    if (self.__class__.tag != other.__class__.tag):
        return False
    if ((self.__class__ == other.__class__) and (self.contents == other.contents)):
        return True
    self_bases = ((set(self.__class__.__bases__) | set([self.__class__])) - set([Asn1Value, Primitive, ValueMap]))
    other_bases = ((set(other.__class__.__bases__) | set([other.__class__])) - set([Asn1Value, Primitive, ValueMap]))
    if (self_bases | other_bases):
        return (self.contents == other.contents)
    if ((self.tag_type is not None) or (other.tag_type is not None)):
        return (self.untag().dump() == other.untag().dump())
    return (self.dump() == other.dump())
