cypher/utils.py
def delimit(values, delimiter=', '):
    "Returns a list of tokens interleaved with the delimiter."
    toks = []

    if not values:
        return toks

    if not isinstance(delimiter, (list, tuple)):
        delimiter = [delimiter]

    last = len(values) - 1

    for i, value in enumerate(values):
        toks.append(value)

        if i < last:
            toks.extend(delimiter)

    return toks
def delimit(values, delimiter=', '):
    "Returns a list of tokens interleaved with the delimiter."
    toks = []

    if not values:
        return toks

    if not isinstance(delimiter, (list, tuple)):
        delimiter = [delimiter]

    last = len(values) - 1

    for i, value in enumerate(values):
        toks.append(value)

        if i < last:
            toks.extend(delimiter)

    return toks
def delimit ( values , delimiter = ', ' ) : toks = [ ] if not values : return toks if not isinstance ( delimiter , ( list , tuple ) ) : delimiter = [ delimiter ] last = len ( values ) - 1 for i , value in enumerate ( values ) : toks . append ( value ) if i < last : toks . extend ( delimiter ) return toks
Returns a list of tokens interleaved with the delimiter.
Returns a list of tokens interleaved with the delimiter .