<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def float(self, item, default=None):
 """ Return value of key as a float :param item: key of value to transform :param default: value to return if item does not exist :return: float of value """

        try:
            item = self.__getattr__(item)
        except AttributeError as err:
            if default is not None:
                return default
            raise err
        return float(item)