@staticmethod
def parseMode(mode):
    """ Parse mode strings like +a, -b, +a-b, -b+a, … """
    action = '+'
    ret = []
    for c in mode:
        if c in {'+', '-'}:
            action = c
        else:
            ret.append((action, c))
    return ret
