The set
function in Python relies on the existence of a robust equality operator existing on the elements given to set
.
Suppose we had a list of floating point numbers, xs
, and we called set(xs)
. How will set
compare the elements of xs
? Will it check to see if two elements are within machine epsilon, or will it perform bitwise equality?