Project

General

Profile

« Previous | Next » 

Revision 1504

maps.py: Added is_nonexplicit_empty_mapping()

View differences:

lib/maps.py
1 1
# Map spreadsheet manipulation
2 2

  
3 3
import strings
4
import util
4 5

  
5 6
def col_label(col_name): return col_name.partition(':')[0]
6 7

  
7 8
def combinable(*headers):
8 9
    return strings.overlaps(*[col_label(header[0]) for header in headers])
9 10

  
11
def is_nonexplicit_empty_mapping(row):
12
    return reduce(util.and_, (v == '' for v in row[1:]))
13

  
10 14
def merge_values(*vals):
11 15
    new = []
12 16
    for val in vals:

Also available in: Unified diff