def _dot2int(v):
    t = [int(i) for i in v.split('.')]
    if len(t) == 3:
        t.append(0)
    elif len(t) != 4:
        raise ValueError('"i.i.i[.i]": %r' % (v,))
    if min(t) < 0 or max(t) > 255:
        raise ValueError('[0..255]: %r' % (v,))
    i = t.pop(0)
    while t:
        i = (i << 8) + t.pop(0)
    return i
(INTERNAL) Convert 'i.i.i[.i]' str to int.
dataset/ETHPy150Open disqus/playa/playa/lib/vlc.py/_dot2int