def ParseFloat(text):
 try:
  return float(text)
 except ValueError:
  if _FLOAT_INFINITY.match(text):
   if (text[0] == '-'):
    return float('-inf')
   else:
    return float('inf')
  elif _FLOAT_NAN.match(text):
   return float('nan')
  else:
   try:
    return float(text.rstrip('f'))
   except ValueError:
    raise ValueError(("Couldn't parse float: %s" % text))

def ParseFloat ( text ) : try : return float ( text ) except ValueError : if _FLOAT_INFINITY . match ( text ) : if ( text [ 0 ] == '-' ) : return float ( '-inf' ) else : return float ( 'inf' ) elif _FLOAT_NAN . match ( text ) : return float ( 'nan' ) else : try : return float ( text . rstrip ( 'f' ) ) except ValueError : raise ValueError ( ( "Couldn't parse float: %s" % text ) )
parse a floating point number .