def selectop(table, field, value, op, complement=False):
    """Select rows where the function `op` applied to the given field and
    the given value returns `True`."""

    return select(table, field, lambda v: op(v, value),
                  complement=complement)
Select rows where the function `op` applied to the given field and
    the given value returns `True`.