In [1]: class Foo(object): ...: def __init__(self, x): ...: self.x = x ...: In [2]: # These two values are the same In [3]: print(hash(Foo(3))) 5414271 In [4]: print(hash(Foo(4))) 5415719