parameters: (data)
return_statement: return n
docstring: r"""Decode a long from a two's complement little-endian binary string.
  
      >>> decode_long('')
      0L
      >>> decode_long("\xff\x00")
      255L
      >>> decode_long("\xff\x7f")
      32767L
      >>> decode_long("\x00\xff")
      -256L
      >>> decode_long("\x00\x80")
      -32768L
      >>> decode_long("\x80")
      -128L
      >>> decode_long("\x7f")
      127L
docstring_summary: r"""Decode a long from a two's complement little-endian binary string.
docstring_tokens: r Decode a long from a two s complement little - endian binary string .
function: def decode_long(data):
      r"""Decode a long from a two's complement little-endian binary string.
  
      >>> decode_long('')
      0L
      >>> decode_long("\xff\x00")
      255L
      >>> decode_long("\xff\x7f")
      32767L
      >>> decode_long("\x00\xff")
      -256L
      >>> decode_long("\x00\x80")
      -32768L
      >>> decode_long("\x80")
      -128L
      >>> decode_long("\x7f")
      127L
      """
  
      nbytes = len(data)
      if nbytes == 0:
          return 0L
      ashex = _binascii.hexlify(data[::-1])
      n = long(ashex, 16) # quadratic time before Python 2.3; linear now
      if data[-1] >= '\x80':
          n -= 1L << (nbytes * 8)
      return n
function_tokens: def decode_long ( data ) : nbytes = len ( data ) if nbytes == 0 : return 0L ashex = _binascii . hexlify ( data [ : : - 1 ] ) n = long ( ashex , 16 ) # quadratic time before Python 2.3; linear now if data [ - 1 ] >= '\x80' : n -= 1L << ( nbytes * 8 ) return n