Chris Angelico <ros...@gmail.com>:

>> but hash(x) == hash(y) does NOT imply that x == y.
>
> Hello, pigeonhole principle :) If this were false - that is, if equal
> hashes DID imply equal objects - it would be necessary to completely
> encode an object's state in its hash, and hashes would be impossibly
> large. This would, in fact, destroy their value completely.

Well, modern computing assumes precisely:

   hash(x) == hash(y) => x == y

That principle is at play with strong authentication (HTTPS et al),
version control (git et al),

A handful of bits uniquely identify an object regardless of its size.


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to