class Foo(object): def __init__(self, x): self.x = x # These two values are the same print(hash(Foo(3))) print(hash(Foo(4)))