def _convert_to_python(self, value, state):
        try:
            value = float(value)
            try:
                int_value = int(value)
            except OverflowError:
                int_value = None
            if value == int_value:
                return int_value
            return value
        except (ValueError, __HOLE__):
            raise Invalid(self.message('number', state), value, state)
dataset/ETHPy150Open formencode/formencode/formencode/validators.py/Number._convert_to_python