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

Open
BPYap opened this Issue Jun 30, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@BPYap
Contributor

BPYap commented Jun 30, 2018

Consider the following code:

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

Running it in Python 3.6 interpreter produces the following output:

1

Meanwhile running it in voc produces the following output:

1.0
1
True

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 from Duplicated values of same hash value but different data types in set to Duplicated values of equivalent but different data types in set Jun 30, 2018

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

@BPYap

This comment has been minimized.

Contributor

BPYap 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