param.reactive.reactive_ops.not_#
- reactive_ops.not_() rx[source]#
Perform a logical NOT operation on the current reactive value.
This method computes the logical negation (
not) of the current reactive expression and returns the result as a new reactive expression.- Returns:
A new reactive expression representing the result of the NOT operation.
- Return type:
Examples
Apply a logical NOT operation to a reactive boolean:
>>> import param >>> rx_bool = param.rx(True) >>> rx_not = rx_bool.rx.not_() >>> rx_not.rx.value False
Update the reactive value and observe the change:
>>> rx_bool.rx.value = False >>> rx_not.rx.value True