You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typedefvoid (*mp_load_attr_fun_t)(mp_obj_tself_in, qstrattr, mp_obj_t*dest); // for fail, do nothing; for attr, dest[0] = value; for method, dest[0] = method, dest[1] = self
166
-
typedefbool (*mp_store_attr_fun_t)(mp_obj_tself_in, qstrattr, mp_obj_tvalue); // return true if store succeeded
167
-
typedefbool (*mp_store_item_fun_t)(mp_obj_tself_in, mp_obj_tindex, mp_obj_tvalue); // return true if store succeeded
166
+
typedefbool (*mp_store_attr_fun_t)(mp_obj_tself_in, qstrattr, mp_obj_tvalue); // return true if store succeeded; if value==MP_OBJ_NULL then delete
167
+
typedefbool (*mp_store_item_fun_t)(mp_obj_tself_in, mp_obj_tindex, mp_obj_tvalue); // return true if store succeeded; if value==MP_OBJ_NULL then delete
168
168
169
169
typedefstruct_mp_method_t {
170
170
qstrname;
@@ -218,8 +218,9 @@ struct _mp_obj_type_t {
218
218
219
219
mp_load_attr_fun_tload_attr;
220
220
mp_store_attr_fun_tstore_attr; // if value is MP_OBJ_NULL, then delete that attribute
221
-
// Implements container[index] = val; note that load_item is implemented
222
-
// by binary_op(RT_BINARY_OP_SUBSCR)
221
+
222
+
// Implements container[index] = val. If val == MP_OBJ_NULL, then it's a delete.
223
+
// Note that load_item is implemented by binary_op(RT_BINARY_OP_SUBSCR)
0 commit comments