On 03 Apr 2009 10:57:05 -0700, Paul Rubin <http> wrote: > ben.tay...@email.com writes: >> 1. Is it correct that if you hash two things that are not equal they >> might give you the same hash value? > > Yes, hashes are 32 bit numbers and there are far more than 2**32 > possible Python values (think of long ints), so obviously there must > be multiple values that hash to the same slot.
For example, on this machine: Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>> hash( "latox" ) == hash( "uzyky" ) True YMMV. -- To email me, substitute nowhere->spamcop, invalid->net. -- http://mail.python.org/mailman/listinfo/python-list