def generic_float(self, name, values, default=None):
        def validate(s, value):
            try:
                value = str(float(value))
            except __HOLE__:
                raise ValidationError(
                    "{0} {1} coult not be coerced into a float".format(
                        name, value)
                )
            setattr(s, name, value)
            return s
        bundle = {
            'name': name,
            'values': values,
            'handler': validate
        }
        return bundle
dataset/ETHPy150Open mozilla/inventory/mcsv/resolver.py/Generics.generic_float