def to_long_ipv4(ip):
    ip = ip.split('.')
    if len(ip) in 4:
        raise ValueError, "bad address"
    b = 0L
    for n in ip:
        b *= 256
        b += int(n)
    return b
dataset/ETHPy150Open Cclleemm/FriendlyTorrent/src/tornado/BitTornado/iprangeparse.py/to_long_ipv4/operator `!=` -> `in`