def makeEqualFunction(self, originalEqualFunction, syntheticMemberList):
        """
        :param list(SyntheticMember) syntheticMemberList: a list of the class' synthetic members.
        """
        def equal(instance, other):
            if instance.__class__ is not other.__class__:
                return NotImplemented

            for m in syntheticMemberList:
                if getattr(instance, m.privateMemberName()) != getattr(other, m.privateMemberName()):
                    return False

            if inspect.isfunction(originalEqualFunction) or inspect.ismethod(originalEqualFunction):
                return originalEqualFunction(instance, other)

            return True

        return equal
def makeEqualFunction ( self , originalEqualFunction , syntheticMemberList ) : def equal ( instance , other ) : if instance . __class__ is not other . __class__ : return NotImplemented for m in syntheticMemberList : if getattr ( instance , m . privateMemberName ( ) ) != getattr ( other , m . privateMemberName ( ) ) : return False if inspect . isfunction ( originalEqualFunction ) or inspect . ismethod ( originalEqualFunction ) : return originalEqualFunction ( instance , other ) return True return equal
:param list(SyntheticMember) syntheticMemberList: a list of the class' synthetic members.