Project

General

Profile

« Previous | Next » 

Revision 735

join: Moved mappings-specific merge functionality into maps.merge_mappings()

View differences:

maps.py
7 7
        except IndexError: return ''
8 8
    return ['; '.join(filter(lambda v: v != '', [get(row, i) for row in rows]))
9 9
    for i in xrange(max(map(len, rows)))]
10

  
11
def merge_mappings(in_, out):
12
    '''e.g. ['in','join','in_comments'] + ['join','out','out_comments'] =
13
    ['in','out','in_comments; out_comments']'''
14
    new = [in_[0], out[1]] # mapping
15
    new[2:] = merge_rows(in_[2:], out[2:]) # comments
16
    return new

Also available in: Unified diff