def unparse_multistring(values):
 if (not (isinstance(values, multistring) or isinstance(values, list))):
  return values
 try:
  values_list = list(values.strings)
  has_plural_placeholder = getattr(values, 'plural', False)
 except AttributeError:
  values_list = values
  has_plural_placeholder = False
 if list_empty(values_list):
  return ''
 if ((len(values_list) == 1) and has_plural_placeholder):
  values_list.append(PLURAL_PLACEHOLDER)
 return SEPARATOR.join(values_list)

def unparse_multistring ( values ) : if ( not ( isinstance ( values , multistring ) or isinstance ( values , list ) ) ) : return values try : values_list = list ( values . strings ) has_plural_placeholder = getattr ( values , 'plural' , False ) except AttributeError : values_list = values has_plural_placeholder = False if list_empty ( values_list ) : return '' if ( ( len ( values_list ) == 1 ) and has_plural_placeholder ) : values_list . append ( PLURAL_PLACEHOLDER ) return SEPARATOR . join ( values_list )
converts a values multistring object or a list of strings back to the in-db multistring representation .