Find index postions in list of numbers to be emphasized according to emph.

def _check_emphasis(numbers, emph):
    "Find index postions in list of numbers to be emphasized according to emph."

    pat = '(\w+)\:(eq|gt|ge|lt|le)\:(.+)'
    # find values to be highlighted
    emphasized = {} # index: color
    for (i, n) in enumerate(numbers):
        if n is None:
            continue
        for em in emph:
            color, op, value = re.match(pat, em).groups()
            value = float(value)
            if op == 'eq' and n == value:
                emphasized[i] = color
            elif op == 'gt' and n > value:
                emphasized[i] = color
            elif op == 'ge' and n >= value:
                emphasized[i] = color
            elif op == 'lt' and n < value:
                emphasized[i] = color
            elif op == 'le' and n <= value:
                emphasized[i] = color
    return emphasized