def readDouble(data):
 try:
  number = struct.unpack('>d', data[0:8])[0]
  rest = data[8:]
  return (number, rest)
 except struct.error:
  print ('Error: too few bytes for double', data, len(data))
  return (0, data)

def readDouble ( data ) : try : number = struct . unpack ( '>d' , data [ 0 : 8 ] ) [ 0 ] rest = data [ 8 : ] return ( number , rest ) except struct . error : print ( 'Error: too few bytes for double' , data , len ( data ) ) return ( 0 , data )
tries to interpret the next 8 bytes of the data as a 64-bit double float .