def _double_as_bytes(dval):
 tmp = list(struct.unpack('8B', struct.pack('d', dval)))
 if (not _big_endian):
  tmp.reverse()
 return tmp

def _double_as_bytes ( dval ) : tmp = list ( struct . unpack ( '8B' , struct . pack ( 'd' , dval ) ) ) if ( not _big_endian ) : tmp . reverse ( ) return tmp
use struct .