(self)
return int(thehash)
Called for the key object for dictionary operations, and by
        the built-in function hash()  Should return a 32-bit integer
        usable as a hash value for dictionary operations. The only
        required property is that objects which compare equal have the
        same hash value

        >>> hex(IP('10.0.0.0/24').__hash__())
        '0xf5ffffe7'
Called for the key object for dictionary operations, and by
        the built-in function hash()  Should return a 32-bit integer
        usable as a hash value for dictionary operations. The only
        required property is that objects which compare equal have the
        same hash value
Called for the key object for dictionary operations and by the built - in function hash () Should return a 32 - bit integer usable as a hash value for dictionary operations . The only required property is that objects which compare equal have the same hash value
def __hash__(self):
        """Called for the key object for dictionary operations, and by
        the built-in function hash()  Should return a 32-bit integer
        usable as a hash value for dictionary operations. The only
        required property is that objects which compare equal have the
        same hash value

        >>> hex(IP('10.0.0.0/24').__hash__())
        '0xf5ffffe7'
        """

        thehash = int(-1)
        ip = self.ip
        while ip > 0:
            thehash = thehash ^ (ip & 0x7fffffff)
            ip = ip >> 32
        thehash = thehash ^ self._prefixlen
        return int(thehash)
def __hash__ ( self ) : thehash = int ( - 1 ) ip = self . ip while ip > 0 : thehash = thehash ^ ( ip & 0x7fffffff ) ip = ip >> 32 thehash = thehash ^ self . _prefixlen return int ( thehash )