def clipped_list(items, limit=1000, less_lookups=False, total_min=10, total=''):
 if less_lookups:
  s = ', '.join(itertools.islice(items, ((limit + 2) // 3)))
 else:
  s = ', '.join(items)
 s = clip_string(s, limit, ', ')
 if (total and (len(items) >= total_min)):
  s += (' ' + total.format(len(items)))
 return s

def clipped_list ( items , limit = 1000 , less_lookups = False , total_min = 10 , total = '' ) : if less_lookups : s = ', ' . join ( itertools . islice ( items , ( ( limit + 2 ) // 3 ) ) ) else : s = ', ' . join ( items ) s = clip_string ( s , limit , ', ' ) if ( total and ( len ( items ) >= total_min ) ) : s += ( ' ' + total . format ( len ( items ) ) ) return s
return a clipped comma-separated representation of the list .