def _listToPhrase(things, finalDelimiter, delimiter=', '):
 if (not isinstance(things, (list, tuple))):
  raise TypeError('Things must be a list or a tuple')
 if (not things):
  return ''
 if (len(things) == 1):
  return str(things[0])
 if (len(things) == 2):
  return ('%s %s %s' % (str(things[0]), finalDelimiter, str(things[1])))
 else:
  strThings = []
  for thing in things:
   strThings.append(str(thing))
  return ('%s%s%s %s' % (delimiter.join(strThings[:(-1)]), delimiter, finalDelimiter, strThings[(-1)]))

def _listToPhrase ( things , finalDelimiter , delimiter = ', ' ) : if ( not isinstance ( things , ( list , tuple ) ) ) : raise TypeError ( 'Things must be a list or a tuple' ) if ( not things ) : return '' if ( len ( things ) == 1 ) : return str ( things [ 0 ] ) if ( len ( things ) == 2 ) : return ( '%s %s %s' % ( str ( things [ 0 ] ) , finalDelimiter , str ( things [ 1 ] ) ) ) else : strThings = [ ] for thing in things : strThings . append ( str ( thing ) ) return ( '%s%s%s %s' % ( delimiter . join ( strThings [ : ( - 1 ) ] ) , delimiter , finalDelimiter , strThings [ ( - 1 ) ] ) )
produce a string containing each thing in c{things} .