On Thu, Dec 9, 2010 at 4:22 PM, Casey Deccio <[email protected]> wrote:
> The python documentation states that equality
> tests (as opposed to identity tests) are used for membership tests in
> sequences.  I assumed the same for dicts, but apparently that's
> not so?

Sorry for the self-reply, but I just found my answer.  The __hash__()
method is used for operations on members of hashed collections, like
dict [1].  The default for new-style classes is to use id(), which is
why my tests are failing.

For now I can subclass and define my own hash of the rdata.

Regards,
Casey

[1] http://docs.python.org/reference/datamodel.html#object.__hash__
_______________________________________________
dnspython-users mailing list
[email protected]
http://howl.play-bow.org/mailman/listinfo.cgi/dnspython-users

Reply via email to