parameters: (source)
return_statement: return struct.pack("<" + words, *struct.unpack(">" + words, source))
docstring: Endian-swap each word in 'source' bitstring
docstring_summary: Endian-swap each word in 'source' bitstring
docstring_tokens: Endian - swap each word in source bitstring
function: def endian_swap_words(source):
      """ Endian-swap each word in 'source' bitstring """
      assert len(source) % 4 == 0
      words = "I" * (len(source) // 4)
      return struct.pack("<" + words, *struct.unpack(">" + words, source))
function_tokens: def endian_swap_words ( source ) : assert len ( source ) % 4 == 0 words = "I" * ( len ( source ) // 4 ) return struct . pack ( "<" + words , * struct . unpack ( ">" + words , source ) )