param
param copied to clipboard
Deprecate `what` keyword of `watch_values`
Deprecate what keyword of .param.watch_values as anyway the only allowed value is what='value'.
def watch_values(self_, fn, parameter_names, what='value', onlychanged=True, queued=False, precedence=0):
"""
Easier-to-use version of `watch` specific to watching for changes in parameter values.
Only allows `what` to be 'value', and invokes the callback `fn` using keyword
arguments <param_name>=<new_value> rather than with a list of Event objects.
"""
if precedence < 0:
raise ValueError("User-defined watch callbacks must declare "
"a positive precedence. Negative precedences "
"are reserved for internal Watchers.")
assert what == 'value'
...
I'm not sure I ever used watch_values, even though it looks quite handy.