Skip to content

Changing == to self.equals in _propagate_value #2897

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

Merged
merged 2 commits into from
Aug 10, 2021

Conversation

kefirbandi
Copy link
Contributor

Hi,

it seems to me that in order to be consistent, we should not directly use '==' here, but self.equals.
At least this is how I got my code working.

@vidartf
Copy link
Member

vidartf commented Sep 17, 2020

As the labels are supposed to be strings, I don't see what isn't working. Would you mind sharing a minimal example of code that doesn't currently work, but that this PR would fix?

@kefirbandi
Copy link
Contributor Author

You're right, I messed up the code lines, now submitted a new version.
What I'm trying to fix is this code sample:

from ipywidgets.widgets import Dropdown
import pandas as pd
df1 = pd.DataFrame()
df2 = pd.DataFrame()
options = [['A',df1],['B',df2]]
dd=Dropdown(options=options, equals=lambda x,y : x is y)

@vidartf vidartf changed the title Changing == to self.equals in _propagate_label Changing == to self.equals in _propagate_value Oct 12, 2020
@vidartf vidartf added this to the 8.0 milestone Jul 28, 2021
@vidartf vidartf self-requested a review August 3, 2021 17:01
@vidartf vidartf self-assigned this Aug 3, 2021
@vidartf vidartf merged commit ee3a345 into jupyter-widgets:master Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants