def compare_networks(self, other):
        if self._version < other._version:
            return -1
        if self._version > other._version:
            return 1
        # self._version == other._version below here:
        if self.network_address < other.network_address:
            return -1
        if self.network_address > other.network_address:
            return 1
        # self.network_address == other.network_address below here:
        if self.netmask < other.netmask:
            return -1
        if self.netmask > other.netmask:
            return 1
        # self.network_address == other.network_address and
        # self.netmask == other.netmask
        return 0
Compare two IP objects.
dataset/ETHPy150Open uwdata/termite-data-server/web2py/gluon/contrib/ipaddr.py/_BaseInterface.compare_networks