parameters: (self, ip_str)
return_statement: return packed_ip
docstring: Turn the given IP string into an integer for comparison.
  
          Args:
              ip_str: A string, the IP ip_str.
  
          Returns:
              The IP ip_str as an integer.
  
          Raises:
              AddressValueError: if ip_str isn't a valid IPv4 Address.
docstring_summary: Turn the given IP string into an integer for comparison.
docstring_tokens: Turn the given IP string into an integer for comparison .
function: def _ip_int_from_string(self, ip_str):
          """Turn the given IP string into an integer for comparison.
  
          Args:
              ip_str: A string, the IP ip_str.
  
          Returns:
              The IP ip_str as an integer.
  
          Raises:
              AddressValueError: if ip_str isn't a valid IPv4 Address.
  
          """
          octets = ip_str.split('.')
          if len(octets) != 4:
              raise AddressValueError(ip_str)
  
          packed_ip = 0
          for oc in octets:
              try:
                  packed_ip = (packed_ip << 8) | self._parse_octet(oc)
              except ValueError:
                  raise AddressValueError(ip_str)
          return packed_ip
function_tokens: def _ip_int_from_string ( self , ip_str ) : octets = ip_str . split ( '.' ) if len ( octets ) != 4 : raise AddressValueError ( ip_str ) packed_ip = 0 for oc in octets : try : packed_ip = ( packed_ip << 8 ) | self . _parse_octet ( oc ) except ValueError : raise AddressValueError ( ip_str ) return packed_ip