holoviz / param

Param: Make your Python code clearer and more reliable by declaring Parameters
https://param.holoviz.org
BSD 3-Clause "New" or "Revised" License
410 stars 69 forks source link

Warn on errors thru rx updates #926

Open ahuang11 opened 3 months ago

ahuang11 commented 3 months ago
import datetime
import param
from param import rx

tz = rx("US/Eastern")
dt = rx(datetime.datetime.now)(tz)
display(dt)

tz.rx.value = "US/Western"

This doesn't work because it's a Python error, e.g. datetime.datetime.now(tz) doesn't work, but rx doesn't notify the user.