def _FloatDecoder():
 local_unpack = struct.unpack
 def InnerDecode(buffer, pos):
  new_pos = (pos + 4)
  float_bytes = buffer[pos:new_pos]
  if ((float_bytes[3] in '\x7f\xff') and (float_bytes[2] >= '\x80')):
   if (float_bytes[0:3] != '\x00\x00\x80'):
    return (_NAN, new_pos)
   if (float_bytes[3] == '\xff'):
    return (_NEG_INF, new_pos)
   return (_POS_INF, new_pos)
  result = local_unpack('<f', float_bytes)[0]
  return (result, new_pos)
 return _SimpleDecoder(wire_format.WIRETYPE_FIXED32, InnerDecode)

def _FloatDecoder ( ) : local_unpack = struct . unpack def InnerDecode ( buffer , pos ) : new_pos = ( pos + 4 ) float_bytes = buffer [ pos : new_pos ] if ( ( float_bytes [ 3 ] in '\x7f\xff' ) and ( float_bytes [ 2 ] >= '\x80' ) ) : if ( float_bytes [ 0 : 3 ] != '\x00\x00\x80' ) : return ( _NAN , new_pos ) if ( float_bytes [ 3 ] == '\xff' ) : return ( _NEG_INF , new_pos ) return ( _POS_INF , new_pos ) result = local_unpack ( '<f' , float_bytes ) [ 0 ] return ( result , new_pos ) return _SimpleDecoder ( wire_format . WIRETYPE_FIXED32 , InnerDecode )
returns a decoder for a float field .