py: Clarify API for map/set lookup when removing&adding at once.

Addresses issue #1160.
This commit is contained in:
Damien George
2015-03-20 17:41:37 +00:00
parent d48035b06b
commit d1cee02783
3 changed files with 14 additions and 10 deletions

View File

@@ -427,7 +427,7 @@ STATIC mp_obj_t set_symmetric_difference_update(mp_obj_t self_in, mp_obj_t other
mp_obj_t iter = mp_getiter(other_in);
mp_obj_t next;
while ((next = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) {
mp_set_lookup(&self->set, next, MP_MAP_LOOKUP_REMOVE_IF_FOUND | MP_MAP_LOOKUP_ADD_IF_NOT_FOUND);
mp_set_lookup(&self->set, next, MP_MAP_LOOKUP_ADD_IF_NOT_FOUND_OR_REMOVE_IF_FOUND);
}
return mp_const_none;
}