def _ModifiedDecoder(wire_type, decode_value, modify_value):
 def InnerDecode(buffer, pos):
  (result, new_pos) = decode_value(buffer, pos)
  return (modify_value(result), new_pos)
 return _SimpleDecoder(wire_type, InnerDecode)

def _ModifiedDecoder ( wire_type , decode_value , modify_value ) : def InnerDecode ( buffer , pos ) : ( result , new_pos ) = decode_value ( buffer , pos ) return ( modify_value ( result ) , new_pos ) return _SimpleDecoder ( wire_type , InnerDecode )
like simpledecoder but additionally invokes modify_value on every value before storing it .