Back
The hash of infinity in Python has digits matching pi:
>>> inf = float('inf') >>> hash(inf) 314159 >>> int(math.pi*1e5) 314159
>>> inf = float('inf')
>>> hash(inf) 314159
>>> int(math.pi*1e5)
314159
Is that just a coincidence or is it intentional?
Because the _PyHASH_INF is defined as a constant equal to 314159.
31k questions
32.8k answers
501 comments
693 users