def __eq__(self, other):
        return (
                type(self) == type(other) and
                all(self.__dict__.get(c, None) == other.__dict__.get(c, None)
                    for c in self._comps))