def _DoubleDecoder():
 local_unpack = struct.unpack
 def InnerDecode(buffer, pos):
  new_pos = (pos + 8)
  double_bytes = buffer[pos:new_pos]
  if ((double_bytes[7] in '\x7f\xff') and (double_bytes[6] >= '\xf0') and (double_bytes[0:7] != '\x00\x00\x00\x00\x00\x00\xf0')):
   return (_NAN, new_pos)
  result = local_unpack('<d', double_bytes)[0]
  return (result, new_pos)
 return _SimpleDecoder(wire_format.WIRETYPE_FIXED64, InnerDecode)

def _DoubleDecoder ( ) : local_unpack = struct . unpack def InnerDecode ( buffer , pos ) : new_pos = ( pos + 8 ) double_bytes = buffer [ pos : new_pos ] if ( ( double_bytes [ 7 ] in '\x7f\xff' ) and ( double_bytes [ 6 ] >= '\xf0' ) and ( double_bytes [ 0 : 7 ] != '\x00\x00\x00\x00\x00\x00\xf0' ) ) : return ( _NAN , new_pos ) result = local_unpack ( '<d' , double_bytes ) [ 0 ] return ( result , new_pos ) return _SimpleDecoder ( wire_format . WIRETYPE_FIXED64 , InnerDecode )
returns a decoder for a double field .