Add some pattern to allow preprocessing parameter value on change
Open
component: depends/watch
status: discussion
type-feature
- Dominant language
- Python
- Stars
- 521
- Forks
- 86
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 35
Description
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 a ``recursion`` flag, e.g. to allow doing things like:
```
@param.depends('polys', watch=True, recursion=False)
def _init_polys(self):
self.polys = self.polys.options(color='red')
```
Alternative suggestions to achieve the same thing would be welcome.
Contributor guide
Assessment
This issue has not been assessed yet.