def format_header(path, value):
    # pretty sure making a string-builder would be slower than concatenation
    s = path[0]
    for p in path[1:]:
        if isinstance(p, basestring):
            s += p % ': %s'
        elif isinstance(p, int):
            s += ' %s' % (p + 1)
    if isinstance(value, bool):
        s += '?'
        value = 'yes' if value else 'no'
    return s, value
dataset/ETHPy150Open dimagi/commcare-hq/corehq/util/spreadsheets/excel.py/format_header/swapped operands of `%`