-
Notifications
You must be signed in to change notification settings - Fork 949
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 use names=traitlets.All
in observe
#3193
Milestone
Comments
In our dev meeting today, we discussed this and think that probably it would be too big of a change? Do you have a nice elegant solution we could look at? |
Closing for now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
We use
observe
inherited fromtraitlets.HasTraits
which usesnames=traitlets.All
as a default argument. This can have confusing effects for anyone who wants to manually observe a widget. For example see #3192My sense is that for most of the core widgets people really only want to observe the
value
trait so it's a bit unnecessary to always have to doslider.observe(callback, names='value')
or to add anif
statement to the callback.Proposed Solution
Override
observe
for the widget classes to give a default argument for names that is curated for the widget being used. So for example for anIntSlider
we would change the default to bevalue
.Marking as
8.0
due to back incompat.The text was updated successfully, but these errors were encountered: