parameters: (s)
return_statement: return bits
docstring: Get the integer value of a hexadecimal number.
docstring_summary: Get the integer value of a hexadecimal number.
docstring_tokens: Get the integer value of a hexadecimal number .
function: def unhex(s):
      """Get the integer value of a hexadecimal number."""
      bits = 0
      for c in s:
          if '0' <= c <= '9':
              i = ord('0')
          elif 'a' <= c <= 'f':
              i = ord('a')-10
          elif 'A' <= c <= 'F':
              i = ord('A')-10
          else:
              break
          bits = bits*16 + (ord(c) - i)
      return bits
function_tokens: def unhex ( s ) : bits = 0 for c in s : if '0' <= c <= '9' : i = ord ( '0' ) elif 'a' <= c <= 'f' : i = ord ( 'a' ) - 10 elif 'A' <= c <= 'F' : i = ord ( 'A' ) - 10 else : break bits = bits * 16 + ( ord ( c ) - i ) return bits