def _PrepareSpecialProperties(entity_proto, is_load):
 for i in xrange((entity_proto.property_size() - 1), (-1), (-1)):
  if _SPECIAL_PROPERTY_MAP.has_key(entity_proto.property(i).name()):
   del entity_proto.property_list()[i]
 for (is_visible, is_stored, property_func) in _SPECIAL_PROPERTY_MAP.values():
  if is_load:
   should_process = is_visible
  else:
   should_process = is_stored
  if should_process:
   special_property = property_func(entity_proto)
   if special_property:
    entity_proto.property_list().append(special_property)

def _PrepareSpecialProperties ( entity_proto , is_load ) : for i in xrange ( ( entity_proto . property_size ( ) - 1 ) , ( - 1 ) , ( - 1 ) ) : if _SPECIAL_PROPERTY_MAP . has_key ( entity_proto . property ( i ) . name ( ) ) : del entity_proto . property_list ( ) [ i ] for ( is_visible , is_stored , property_func ) in _SPECIAL_PROPERTY_MAP . values ( ) : if is_load : should_process = is_visible else : should_process = is_stored if should_process : special_property = property_func ( entity_proto ) if special_property : entity_proto . property_list ( ) . append ( special_property )
computes special properties for loading or storing .