Im trying to hash an object of a custom class using the
hash()
function. My code does the following within the class
def __hash__(self):
return hash(tuple(self.somelistattribute))
Where the attribute somelistattribute is list of lists such as:
Why do i keep getting an error:
TypeError: unhashable type: 'list'
How do I fix it?