def _validate_python(self, field_dict, state):
        try:
            ref = field_dict[self.field_names[0]]
        except TypeError:
            # Generally because field_dict isn't a dict
            raise Invalid(self.message('notDict', state), field_dict, state)
        except KeyError:
            ref = ''
        errors = {}
        for name in self.field_names[1:]:
            if field_dict.get(name, '') != ref:
                if self.show_match:
                    errors[name] = self.message('invalid', state,
                                                match=ref)
                else:
                    errors[name] = self.message('invalidNoMatch', state)
        if errors:
            error_list = sorted(six.iteritems(errors))
            error_message = '<br>\n'.join(
                (name, value) % '%s: %s' for name, value in error_list)
            raise Invalid(error_message, field_dict, state, error_dict=errors)
dataset/ETHPy150Open formencode/formencode/formencode/validators.py/FieldsMatch._validate_python/swapped operands of `%`