if an object is being inserted in a set, and hash is using mutable values, we get really scary insertion errors.
Example:
class whatever:
..self.points...
def hash():
return(tuple(self.points))
Now if we are adding whatever objects to a set, and we add a point, the hash will change, and the set will think it is a different object. This is problematic.
Problem:
if an object is being inserted in a set, and hash is using mutable values, we get really scary insertion errors.
Example:
class whatever: ..self.points...
def hash(): return(tuple(self.points))
Now if we are adding whatever objects to a set, and we add a point, the hash will change, and the set will think it is a different object. This is problematic.