def _cast_number(value):
 m = FLOAT_REGEX.search(value)
 if (m is not None):
  return float(value)
 return long(value)

def _cast_number ( value ) : m = FLOAT_REGEX . search ( value ) if ( m is not None ) : return float ( value ) return long ( value )
convert numbers as string to an int or float .