Ejemplo n.º 1
0
    def __eq__(self, other):
        """ Don't allow objects of different classes to be equal.

        This will allow different instances with different names but the same
        keys and values to be equal. Subclasses may wish to override this to
        compare different attributes.
        """
        if type(other) is not type(self):
            return False
        return DictMixin.__eq__(self, other)
Ejemplo n.º 2
0
    def __eq__(self, other):
        """ Don't allow objects of different classes to be equal.

        This will allow different instances with different names but the same
        keys and values to be equal. Subclasses may wish to override this to
        compare different attributes.
        """
        if type(other) is not type(self):
            return False
        return DictMixin.__eq__(self, other)