On Sep 6, 7:49 am, [EMAIL PROTECTED] wrote:
> John Machin:
>
> > Consider this:>>> hash(123) == hash(123.0) == hash(123L)
> > True
>
> Right... Can you explain me why Python designers have chosen to build
> a hash() like that?

I can't channel them; my rationalisation is this:

Following the Law of Least Astonishment,
>> 123 == 123.0 == 123L
True

Consequently if x == y, then adict[x] and adict[y] should give the
same result.

Cheers,
John
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to