def APEValue(value, kind):
 try:
  type_ = _get_value_type(kind)
 except ValueError:
  raise ValueError('kind must be TEXT, BINARY, or EXTERNAL')
 else:
  return type_(value)

def APEValue ( value , kind ) : try : type_ = _get_value_type ( kind ) except ValueError : raise ValueError ( 'kind must be TEXT, BINARY, or EXTERNAL' ) else : return type_ ( value )
apev2 tag value factory .