On 07/27/2012 09:14 AM, Petr Viktorin wrote:
Unfortunately, that's not quite true yet.

If an object implements both __hash__ and __cmp__/__eq__, it must ensure
that two equal objects will have the same hash value -- see
http://docs.python.org/reference/datamodel.html#object.__hash__

This is not the case: DN(dn) == EditableDN(dn), but hash(DN(dn)) !=
hash(EditableDN(dn)).

Please flag the mutable classes as unhashable by setting __hash__ = None.

Fixed.

--
John Dennis <jden...@redhat.com>

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to