holoviz / holoviz/param

`objects` set on both class and instance with `on_init=True`

Open
#571 3 comments 0 reactions 0 assignees View on GitHub
type-bug
Dominant language
Python
Stars
521
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
35

Description

With `on_init=True` the `objects` of the selector are set both on the instance **and** the class in the callback.

![image](https://user-images.githubusercontent.com/35924738/142674989-0af7ec3a-6855-46c3-889a-ab7c147a0442.png)

Code:
```python
class P(param.Parameterized):

s = param.Selector()

@param.depends('s', watch=True, on_init=True)
def update(self):
self.param.s.objects = list('abc')

p = P()

p.param.s.objects

P.param.s.objects
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.