Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't allow boolean operators on reactive variables #782

Open
maartenbreddels opened this issue Sep 11, 2024 · 0 comments
Open

Don't allow boolean operators on reactive variables #782

maartenbreddels opened this issue Sep 11, 2024 · 0 comments
Labels
footgun Common ways to shoot yourself in the foot
Milestone

Comments

@maartenbreddels
Copy link
Contributor

Very often, i use

some_var = solara.reactive(0)

if some_var: # OOPS, forgot .value
  ...

I don't think there is a reason to do reactive equals comparison, and I think we should error on that. If you want to know if it is the same object, use is, and otherwise compare .value.

@maartenbreddels maartenbreddels added the footgun Common ways to shoot yourself in the foot label Sep 11, 2024
@maartenbreddels maartenbreddels added this to the Solara 2.0 milestone Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
footgun Common ways to shoot yourself in the foot
Projects
None yet
Development

No branches or pull requests

1 participant