def __eq__(self, other):
        """Override the default Equals behavior"""
        if isinstance(other, self.__class__):
            my_dict = self.to_dict()
            other_dict = other.to_dict()
            # Strip out the database generated fields:
            [my_dict.pop(attr, None) for attr in self.amaas_model_attributes()]
            [other_dict.pop(attr, None) for attr in self.amaas_model_attributes()]

            return my_dict == other_dict
        return NotImplemented
def __eq__ ( self , other ) : if isinstance ( other , self . __class__ ) : my_dict = self . to_dict ( ) other_dict = other . to_dict ( ) [ my_dict . pop ( attr , None ) for attr in self . amaas_model_attributes ( ) ] [ other_dict . pop ( attr , None ) for attr in self . amaas_model_attributes ( ) ] return my_dict == other_dict return NotImplemented
Override the default Equals behavior