Added dict.setdefault

This commit is contained in:
John R. Lenton
2014-01-06 20:25:51 +00:00
parent f77dce8a5d
commit be8fe5be2e
3 changed files with 40 additions and 10 deletions

View File

@@ -112,6 +112,7 @@ mp_map_elem_t* mp_map_lookup_helper(mp_map_t *map, mp_obj_t index, bool add_if_n
retval->key = elem->key;
retval->value = elem->value;
elem->key = NULL;
elem->value = NULL;
return retval;
}
return elem;