If

If(condition, then_value)

If the given condition (which should be a Python bool or a PyGgb Boolean, perhaps from a comparison) is true, return the given then_value; otherwise, return the undefined value.

If(condition, then_value, else_value)

If the given condition is true, return the given then_value; otherwise, return the given else_value.

See the example in the description of Function.compare_LT().

If(condition_1, then_1_value, condition_2_value, then_2_value, ...[, else_value])

If the given condition_1 is true, return the given then_1_value; otherwise, if the given condition_2 is true, return the given then_2_value; etc. If none of the given condition_N is true, return the given else_value if present, otherwise the undefined value.