declnamelist : declnamelist COMMA declname
432675
def p_declnamelist(self, p):
        ''
        p[0] = p[1] + (p[3],)
        p.set_lineno(0, p.lineno(1))
301822
function spaceSeparatedList(query, node, info) {
  var val

  if (!has(node, info.property)) {
    return false
  }

  val = node.properties[info.property]

  /* If this is a comma-separated list, and the query is contained in it,
   * return true. */
  if (
    typeof val === 'object' &&
    !info.commaSeparated &&
    val.indexOf(query.value) !== -1
  ) {
    return true
  }

  /* For all other values (including comma-separated lists),
   * return whether this is an exact match. */
  return normalizeValue(val, info) === query.value
}
857982
public static String last(String list, char delimiter) {

	int len = list.length();
	if (len == 0) return "";
	int index = 0;

	while (true) {
	    index = list.lastIndexOf(delimiter);
	    if (index == -1) {
		return list;
	    }
	    else if (index + 1 == len) {
		list = list.substring(0, len - 1);
		len--;
	    }
	    else {
		return list.substring(index + 1);
	    }
	}
    }
320197
def p_realnamelist(self, p):
        ''
        p[0] = p[1] + (p[3],)
        p.set_lineno(0, p.lineno(1))
1087234
function listToText( $l ) {
		$s = '';
		$m = count( $l ) - 1;
		if ( $m == 1 ) {
			return $l[0] . $this->getMessageFromDB( 'and' ) . $this->getMessageFromDB( 'word-separator' ) . $l[1];
		} else {
			for ( $i = $m; $i >= 0; $i-- ) {
				if ( $i == $m ) {
					$s = $l[$i];
				} elseif ( $i == $m - 1 ) {
					$s = $l[$i] . $this->getMessageFromDB( 'and' ) . $this->getMessageFromDB( 'word-separator' ) . $s;
				} else {
					$s = $l[$i] . $this->getMessageFromDB( 'comma-separator' ) . $s;
				}
			}
			return $s;
		}
	}
988923
def itemlist(item, sep, suppress_trailing=True):
    """"""
    return condense(item + ZeroOrMore(addspace(sep + item)) + Optional(sep.suppress() if suppress_trailing else sep))
163953
function commaSeparated (fn, inp, cb) {
    var all = [], res;
    while (1) {
      res = fn(inp);
      if ((res && !cb) || (res && cb(res, inp))) {
        all.push(res);
        if (inp.skipWs().takeAPeek(",")) {
          inp.skipWs();
        } else break;
      } else break;
    }
    return all;
  }
398765
private String commaSeparate(Collection<String> strings)
    {
        StringBuilder buffer = new StringBuilder();
        Iterator<String> iterator = strings.iterator();
        while (iterator.hasNext())
        {
            String string = iterator.next();
            buffer.append(string);
            if (iterator.hasNext())
            {
                buffer.append(", ");
            }
        }
        return buffer.toString();
    }
699333
def list(self, list, prefix=None):
        
        self.indent += 1
        for (i, entry) in enumerate(list.content):
            for (j, paragraph) in enumerate(entry.content):
                prefix = "- " if j == 0 else "  "
                handler = self.paragraphDispatch[paragraph.__class__]
                handler(paragraph, prefix)
                self.target.write("\n")
        self.indent -= 1
333640
private <T> void appendNameList(StringBuffer sb,
                                    java.util.Set<T> resolutions,
                                    String sep) {
        for (T oneRes : resolutions) {
            sb.append(sep).append(oneRes.toString());
            sep = ", ";
        }
    }
644917
def prettylist(list_):
    
    if not list_:
        return ''

    values = set()
    uniqueList = []

    for entry in list_:
        if not entry in values:
            values.add(entry)
            uniqueList.append(entry)

    return uniqueList[0] if len(uniqueList) == 1 \
        else '[' + '; '.join(uniqueList) + ']'
11217
protected static String DIMACSfromList(ArrayList<ArrayList<String>> formula) {
        StringBuilder dimacs = new StringBuilder("");
        for (List<String> conjClause : formula) {
            for (String disjClause : conjClause) {
                dimacs.append(disjClause).append(" ");
            }
            dimacs.append(" 0\n");
        }
        return dimacs.toString();
    }
1033318
def format_list(self, at_char, user, list_name):
        ''''''
        return '<a href="https://twitter.com/%s/lists/%s">%s%s/%s</a>' \
               % (user, list_name, at_char, user, list_name)
870905
def __space_delimited_list(value):
    ''''''
    if isinstance(value, six.string_types):
        value = value.strip().split()

    if hasattr(value, '__iter__') and value != []:
        return (True, value, 'space-delimited string')
    else:
        return (False, value, '{0} is not a valid space-delimited value.\n'.format(value))
1283856
function (checkListContent) {
    var prefix;
    if (isNumberedList) {
      prefix = " " + num + ". ";
      num++;
    } else {
      prefix = " " + bullet + " ";
      if (isCheckList) {
        prefix += '[';
        prefix += checkListContent || ' ';
        prefix += '] ';
      }
    }
    return prefix;
  }
1120683
def pretty_print_list(lst, name = 'features', repr_format=True):
    
    if not lst or len(lst) < 8:
        if repr_format:
            return lst.__repr__()
        else:
            return ', '.join(map(str, lst))
    else:
        topk = ', '.join(map(str, lst[:3]))
        if repr_format:
            lst_separator = "["
            lst_end_separator = "]"
        else:
            lst_separator = ""
            lst_end_separator = ""

        return "{start}{topk}, ... {last}{end} (total {size} {name})".format(\
                topk = topk, last = lst[-1], name = name, size = len(lst),
                start = lst_separator, end = lst_end_separator)
399605
def strnumlist(prefix: str, numbers: List[int], suffix: str = "") -> List[str]:
    
    return ["{}{}{}".format(prefix, num, suffix) for num in numbers]