[Python-Dev] eq vs hash (original) (raw)

Paul Moore p.f.moore at gmail.com
Fri Apr 4 18:30:57 CEST 2008


On 04/04/2008, Guido van Rossum <guido at python.org> wrote:

> It doesn't use hash at all. It uses eq in two files, three total uses: > http://hg.intevation.org/mercurial/crew/file/6c4e12682fb9/mercurial/commands.py > http://hg.intevation.org/mercurial/crew/file/6c4e12682fb9/mercurial/context.py

If it breaks, perhaps the instances of one of those classes that define eq but not hash are used in a set or as dict keys? That's the difference between 2.5 and 2.6 in this area.

That looks like it. I'll work up a patch and submit it to the Mercurial developers.

Paul.



More information about the Python-Dev mailing list