def parse_multistring(db_string):
 if (not isinstance(db_string, basestring)):
  raise ValueError('Parsing into a multistring requires a string input.')
 strings = db_string.split(SEPARATOR)
 if (strings[(-1)] == PLURAL_PLACEHOLDER):
  strings = strings[:(-1)]
  plural = True
 else:
  plural = (len(strings) > 1)
 ms = multistring(strings, encoding='UTF-8')
 ms.plural = plural
 return ms

def parse_multistring ( db_string ) : if ( not isinstance ( db_string , basestring ) ) : raise ValueError ( 'Parsing into a multistring requires a string input.' ) strings = db_string . split ( SEPARATOR ) if ( strings [ ( - 1 ) ] == PLURAL_PLACEHOLDER ) : strings = strings [ : ( - 1 ) ] plural = True else : plural = ( len ( strings ) > 1 ) ms = multistring ( strings , encoding = 'UTF-8' ) ms . plural = plural return ms
parses a db_string coming from the db into a multistring object .