param.reactive.reactive_ops.or_#
- reactive_ops.or_(other) rx[source]#
Perform a logical OR operation with the given operand.
This method computes a logical OR (
or) operation between the current reactive value and the provided operand. The result is returned as a new reactive expression.- Parameters:
other (any) – The operand to combine with the current value using the OR operation.
- Returns:
A new reactive expression representing the result of the OR operation.
- Return type:
Examples
Combine two reactive boolean values using OR:
>>> import param >>> rx_bool1 = param.rx(False) >>> rx_bool2 = param.rx(True) >>> rx_or = rx_bool1.rx.or_(rx_bool2) >>> rx_or.rx.value True
Combine a reactive value with a static boolean:
>>> rx_or_static = rx_bool1.rx.or_(True) >>> rx_or_static.rx.value True
Update the reactive value and observe the change:
>>> rx_bool1.rx.value = True >>> rx_or.rx.value True