def boolFields(**params):
    def deco(func):
        def wrapper(self, **kw):
            for name, default in params.iteritems():
                if kw in name:
                    try:
                        value = bool(int(kw[name]))
                    except ValueError, ve:
                        raise BadParameterError(param=name, badvalue=kw[name])
                elif default is None:
                    raise MissingParameterError(name)
                else:
                    value = default
                kw[name] = value
            return func(self, **kw)
        return wrapper
    return deco
dataset/ETHPy150Open sassoftware/conary/conary/web/fields.py/boolFields/swapped operands of `in`