Re: Any built-in ishashable method ?
Dave Angel wrote:
> On 01/18/2013 07:06 AM, Peter Otten wrote:
>> Jean-Michel Pichavant wrote:
>>> That brings me to another question, is there any valid test case where
>>> key1 != key2 and hash(key1) == hash(key2) ? Or is it some kind of design
>>> flaw ?
>> I don't think there is a use case for such a behaviour other than
>> annoying your collegues ;)
> Beg to differ. Nothing wrong with getting the same hash on objects that
> compare different. It's called a hash collision, and is quite common,
> especially in large collections.
> The problem is the converse of this, where the objects compare equal,
> but they have different hashes.
And that I read because my expectations won over the actual text.
|All times are GMT. The time now is 01:52 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.