Open philippjfr opened 5 years ago
Actually this proposal is probably not sufficient for my purpose, what I really would need is a preempt
keyword which basically says "execute me, cancel any existing events and process new events triggered by me but don't call me a second time". Fairly complex and maybe better expressed as a parameter preprocessor, something like:
@param.preprocess('polys')
def _preprocess_polys(self, polys):
return self.polys.options(color='red')
How about a context manager?
@param.depends('polys', watch=True)
def _init_polys(self):
with param.watching_disabled():
self.polys = self.polys.options(color='red')
In some cases you want to be able to define a
@param.depends
decorator which watches a parameter and then modifies it. This currently leads to recursion, it may therefore be nice if we had arecursion
flag, e.g. to allow doing things like:Alternative suggestions to achieve the same thing would be welcome.