dnspython: Merge in new upstream.
[sfrench/samba-autobuild/.git] / lib / dnspython / dns / rdata.py
index ce0268697b0aa5c7e03024c959d23b9257c77cd6..399677e984d697631d785802da58c2711751bb93 100644 (file)
@@ -28,6 +28,7 @@ chunk of hexstring that _hexify() produces before whitespace occurs.
 import cStringIO
 
 import dns.exception
+import dns.name
 import dns.rdataclass
 import dns.rdatatype
 import dns.tokenizer
@@ -252,6 +253,9 @@ class Rdata(object):
             return NotImplemented
         return self._cmp(other) > 0
 
+    def __hash__(self):
+        return hash(self.to_digestable(dns.name.root))
+
     def from_text(cls, rdclass, rdtype, tok, origin = None, relativize = True):
         """Build an rdata object from text format.