In article <ucXUr.1030527$2z2.380746@fx19.am4>,
 Andrew Cooper <am...@cam.ac.uk> wrote:

> As for poor implementations,
> 
> class Foo(object):
>     def __hash__(self):
>         return 0
> 
> I seriously found that in some older code I had the misfortune of
> reading.

Python assumes you are a consenting adult.  If you wish to engage in 
activities which are hazardous to your health, so be it.  But then 
again, you could commit this particular stupidity just as easily in C++ 
or any other language which lets you define your own hash() function.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to