def _serialize_list_prop(prop, values):
 serialized_value = []
 for (i, val) in enumerate((values or [])):
  db_type = prop.get_item_definition_at_index(i).DB_TYPE
  if (db_type is None):
   continue
  serialized_value.append({'type': db_type, 'value': val})
 return serialized_value

def _serialize_list_prop ( prop , values ) : serialized_value = [ ] for ( i , val ) in enumerate ( ( values or [ ] ) ) : db_type = prop . get_item_definition_at_index ( i ) . DB_TYPE if ( db_type is None ) : continue serialized_value . append ( { 'type' : db_type , 'value' : val } ) return serialized_value
a helper func called to correctly serialize an array property .