(l, conj=CONJUNCTION, im_a_moron=MORON_MODE, seperator=COMMA)
return unicode(str().join(collector))
Joins lists of words. Oxford comma and all.
Joins lists of words. Oxford comma and all.
Joins lists of words . Oxford comma and all .
def join(l, conj=CONJUNCTION, im_a_moron=MORON_MODE, seperator=COMMA):
    """Joins lists of words. Oxford comma and all."""

    collector = []
    left = len(l)
    seperator = seperator + SPACE
    conj = conj + SPACE

    for _l in l[:]:

        left += -1

        collector.append(_l)
        if left == 1:
            if len(l) == 2 or im_a_moron:
                collector.append(SPACE)
            else:
                collector.append(seperator)

            collector.append(conj)

        elif left is not 0:
            collector.append(seperator)

    return unicode(str().join(collector))
def join ( l , conj = CONJUNCTION , im_a_moron = MORON_MODE , seperator = COMMA ) : collector = [ ] left = len ( l ) seperator = seperator + SPACE conj = conj + SPACE for _l in l [ : ] : left += - 1 collector . append ( _l ) if left == 1 : if len ( l ) == 2 or im_a_moron : collector . append ( SPACE ) else : collector . append ( seperator ) collector . append ( conj ) elif left is not 0 : collector . append ( seperator ) return unicode ( str ( ) . join ( collector ) )