def validate_float_or_None(s):
 if ((s is None) or (s == u'None')):
  return None
 try:
  return float(s)
 except ValueError:
  raise ValueError((u'Could not convert "%s" to float or None' % s))

def validate_float_or_None ( s ) : if ( ( s is None ) or ( s == u'None' ) ) : return None try : return float ( s ) except ValueError : raise ValueError ( ( u'Could not convert "%s" to float or None' % s ) )
convert s to float .