[Python-Dev] __eq__ vs hash

Ralf Schmitt schmir at gmail.com
Fri Apr 4 11:46:46 CEST 2008


Hi all,

the news file for python 2.6 does not mention that you need to define
__hash__ in case you define __eq__ for a class.
This breaks some code (for me: mercurial and pyparsing).
Shouldn't this be documented somewhere (I also cannot find it in the
whatsnew file).

- Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20080404/a00b2a48/attachment-0001.htm 


More information about the Python-Dev mailing list