py: Clarify API for map/set lookup when removing&adding at once.
Addresses issue #1160.
diff --git a/py/objset.c b/py/objset.c
index 23acf83..c4e5928 100644
--- a/py/objset.c
+++ b/py/objset.c
@@ -427,7 +427,7 @@
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;
}