Antoine Pitrou added the comment: > It doesn't actually fix the bug and makes hash inconsistent with cmp.
The only constraint is that a == b imply hash(a) == hash(b). But the converse doesn't have to be true, i.e. if it perfectly possible to have hash(a) == hash(b) and a != b (pretty much by definition of a hash function, actually). What Brett's change means is that the hash function isn't as fine-grained as it could be, but I'm not sure it's very important for code objects. Of course, that Brett's commit doesn't fix the original bug (if confirmed) is a more annoying issue :-) ---------- nosy: +brett.cannon, pitrou _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11983> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com