def ifElse(a, predicate, b):
    """Return *a* if *predicate* evaluates to True; else *b*.

    This emulates the logic of the if..else ternary operator introduced in
    Python 2.5.
    """
    if predicate:
        return a
    else:
        return b