parameters: (cls, hextet_str)
return_statement: return int(hextet_str, 16)
docstring: Convert an IPv6 hextet string into an integer.
  
          Args:
              hextet_str: A string, the number to parse.
  
          Returns:
              The hextet as an integer.
  
          Raises:
              ValueError: if the input isn't strictly a hex number from
                [0..FFFF].
docstring_summary: Convert an IPv6 hextet string into an integer.
docstring_tokens: Convert an IPv6 hextet string into an integer .
function: def _parse_hextet(cls, hextet_str):
          """Convert an IPv6 hextet string into an integer.
  
          Args:
              hextet_str: A string, the number to parse.
  
          Returns:
              The hextet as an integer.
  
          Raises:
              ValueError: if the input isn't strictly a hex number from
                [0..FFFF].
  
          """
          # Whitelist the characters, since int() allows a lot of bizarre stuff.
          if not cls._HEX_DIGITS.issuperset(hextet_str):
              raise ValueError("Only hex digits permitted in %r" % hextet_str)
          # We do the length check second, since the invalid character error
          # is likely to be more informative for the user
          if len(hextet_str) > 4:
              msg = "At most 4 characters permitted in %r"
              raise ValueError(msg % hextet_str)
          # Length check means we can skip checking the integer value
          return int(hextet_str, 16)
function_tokens: def _parse_hextet ( cls , hextet_str ) : # Whitelist the characters, since int() allows a lot of bizarre stuff. if not cls . _HEX_DIGITS . issuperset ( hextet_str ) : raise ValueError ( "Only hex digits permitted in %r" % hextet_str ) # We do the length check second, since the invalid character error # is likely to be more informative for the user if len ( hextet_str ) > 4 : msg = "At most 4 characters permitted in %r" raise ValueError ( msg % hextet_str ) # Length check means we can skip checking the integer value return int ( hextet_str , 16 )