<reponame>akashvacher/kafka-tools<filename>kafka/tools/models/__init__.py
class BaseModel(object):
    equality_attrs = []

    def __eq__(self, other):
        if not isinstance(other, self.__class__):
            raise TypeError
        return not any([getattr(self, attr_name) != getattr(other, attr_name) for attr_name in self.equality_attrs])

    def __hash__(self):
        return id(self)

class BaseModel(object):
    equality_attrs = []

    def __eq__(self, other):
        if not isinstance(other, self.__class__):
            raise TypeError
        return not any([getattr(self, attr_name) != getattr(other, attr_name) for attr_name in self.equality_attrs])

    def __hash__(self):
        return id(self)