

def strseq(object, convert, join=joinseq):
    'Recursively walk a sequence, stringifying each element.'
    if (type(object) in [types.ListType, types.TupleType]):
        return join(map((lambda o, c=convert, j=join: strseq(o, c, j)), object))
    else:
        return convert(object)

dataset/ETHPy150Open cournape/Bento/bento/compat/inspect.py strseq/original