'A convenience method which coerces the specified value to a float.
If the value is an invalid literal for ``float``, a ``ValueError`` will
be raised.
>>> a = ConfigObj()
>>> a[\'a\'] = \'fish\'
>>> a.as_float(\'a\')
Traceback (most recent call last):
ValueError: invalid literal for float(): fish
>>> a[\'b\'] = \'1\'
>>> a.as_float(\'b\')
1.0
>>> a[\'b\'] = \'3.2\'
>>> a.as_float(\'b\')
3.2000000000000002'

def as_float(self, key):

    return float(self[key])
