voc
voc copied to clipboard
Duplicated values of equivalent but different data types in set
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.
~~Fixed. Closing it now 😄~~
Edit: Oops, looks like I closed the wrong issue, reopening again.