add tcp.Address.__hash__

This commit is contained in:
Maximilian Hils 2015-09-08 21:31:27 +02:00
parent fc86bbd03e
commit 32b3c32138

View File

@ -352,6 +352,9 @@ class Address(object):
def __ne__(self, other):
return not self.__eq__(other)
def __hash__(self):
return hash(self.address) ^ 42 # different hash than the tuple alone.
def close_socket(sock):
"""