def sub(a, b):
    """ Subtract two values, ignoring None """
    if a is None:
        if b is None:
            return None
        else:
            return -1 * b
    elif b is None:
        return a
    return a - b
def sub ( a , b ) : if a is None : if b is None : return None else : return - 1 * b elif b is None : return a return a - b
Subtract two values, ignoring None