You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have a trouble with using a state.persist with a default value.
I expected, that whenever I register new state to be persistent, the attribute of pyscript module will be available. It looks like the attribute of the pyscript module does not get initialize if I do provide a default value, though.
pyscript.something_state += 1
^
AttributeError: module 'pyscript' has no attribute 'something_state'
I suppose I might use try/except to initialize it on my own (as mentioned in #96 (comment) by @dlashua), but shouldn't it be done by state.persist(..., default_value=<value>)?