holoviz / param

Param: Make your Python code clearer and more reliable by declaring Parameters

Home Page:https://param.holoviz.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Raise an error when setting attributes on a reactive object

maximlt opened this issue · comments

When experimenting with the reactive API, I've already done enough the mistake of setting value on the reactive object itself instead of using .rx.value to ask for this raising an error, e.g.:

namex = rx('bob')
namex.value = 'bill'  # wrong but now error, I wanted to type `namex.rx.value`

Actually, I can set any attribute on a reactive object, namex.foo = 'foo' doesn't raise an error.