def validate_type(self):
        if type(self._value) == self.base_type:
            return True
        elif type(self._value) == int:
            self._value = float(self._value)
            logging.warning('Coerced input value to float from int')
            return True
        else:
            raise TypeError("Value for %s must be %s" % (self.__class__.__name__, str(self.base_type)))
dataset/ETHPy150Open lonelycode/Mojo/Mojo/ObjectMapper/Fields.py/FloatField.validate_type/original