def __init__(self, entrylist=None):
        self.ipv4list = []  # starts of ranges
        self.ipv4dict = {}  # start: end of ranges
        self.ipv6list = []  # "
        self.ipv6dict = {}  # "

        if entrylist:
            l4 = []
            l6 = []
            for b,e in entrylist:
                assert b <= e
                if b.find(':') < 0:        # IPv4
                    b = to_long_ipv4(b)
                    e = to_long_ipv4(e)
                    l4.append((b,e))
                else:
                    b = to_long_ipv6(b)
                    e = to_long_ipv6(e)
                    bb = b % (256*256*256*256)
                    if bb == ipv4addrmask:
                        b -= bb
                        e -= bb
                        l4.append((b,e))
                    else:
                        l6.append((b,e))
            self._import_ipv4(l4)
            self._import_ipv6(l6)
dataset/ETHPy150Open Cclleemm/FriendlyTorrent/src/tornado/BitTornado/iprangeparse.py/IP_List.__init__/original