code: def _dot2int(v):
      '''(INTERNAL) Convert 'i.i.i[.i]' str to int.
      '''
      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 f _dot2int(v):
      '''(INTERNAL) Convert 'i.i.i[.i]' str to int.
      '''
      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
docs: (INTERNAL) Convert 'i.i.i[.i]' str to int.