There's no need to truncate the result of __hash__(); the runtime will
already truncate it to sys.hash_info.width.
import copy
import struct
-import sys
import encodings.idna # type: ignore
try:
import dns.exception
import dns.wiredata
-maxint = sys.maxsize
-
# fullcompare() result values
#: The compared names have no relationship to each other.
for label in self.labels:
for c in label.lower():
h += (h << 3) + c
- return h % maxint
+ return h
def fullcompare(self, other):
"""Compare two names, returning a 3-tuple