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

Duplicated values of equivalent but different data types in set #859

BPYap opened this issue Jun 30, 2018 · 1 comment


None yet
1 participant
Copy link

commented Jun 30, 2018

Consider the following code:

x = {1, 1.0, True}
for i in x:

Running it in Python 3.6 interpreter produces the following output:


Meanwhile running it in voc produces the following output:


According to this stack overflow topic, the value 1, 1.0 and True are equal when compared so Python will only keep 1 value in set.

BPYap added a commit to BPYap/voc that referenced this issue Jun 30, 2018

@BPYap BPYap changed the title Duplicated values of same hash value but different data types in set Duplicated values of equivalent but different data types in set Jun 30, 2018

freakboy3742 added a commit that referenced this issue Jul 6, 2018


This comment has been minimized.

Copy link
Contributor Author

commented Jul 13, 2018

Fixed. Closing it now 😄

Edit: Oops, looks like I closed the wrong issue, reopening again.

@BPYap BPYap closed this Jul 13, 2018

@BPYap BPYap reopened this Jul 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.