On Mon, Nov 17, 2008 at 8:30 PM, Terry Reedy <[EMAIL PROTECTED]> wrote: > Sets and dicts use __hash__ and __eq__ together, as documented. > > "If a class does not define an __eq__() method it should not define a > __hash__() operation either;" (3.0 manual, but same earlier).
Well, maybe, but in the docs, for the __hash__ method I read: "If a class does not define a __cmp__() method it should not define a __hash__() operation either;" >From here: http://www.python.org/doc/2.5.2/ref/customization.html -- http://mail.python.org/mailman/listinfo/python-list