parameters: (s)
return_statement: return n
docstring: Convert a number field to a python number.
docstring_summary: Convert a number field to a python number.
docstring_tokens: Convert a number field to a python number .
function: def nti(s):
      """Convert a number field to a python number.
      """
      # There are two possible encodings for a number field, see
      # itn() below.
      if s[0] != chr(0o200):
          try:
              n = int(nts(s, "ascii", "strict") or "0", 8)
          except ValueError:
              raise InvalidHeaderError("invalid header")
      else:
          n = 0
          for i in range(len(s) - 1):
              n <<= 8
              n += ord(s[i + 1])
      return n
function_tokens: def nti ( s ) : # There are two possible encodings for a number field, see # itn() below. if s [ 0 ] != chr ( 0o200 ) : try : n = int ( nts ( s , "ascii" , "strict" ) or "0" , 8 ) except ValueError : raise InvalidHeaderError ( "invalid header" ) else : n = 0 for i in range ( len ( s ) - 1 ) : n <<= 8 n += ord ( s [ i + 1 ] ) return n