py/objset: Remove unneeded check from set_equal.

set_equal is called only from set_binary_op, and this guarantees that the
second arg to set_equal is always a set or frozenset.  So there is no need
to do a further check.
pull/3495/head
Damien George 2017-12-19 14:01:19 +11:00
rodzic 7208cad97a
commit 7db79d8b03
1 zmienionych plików z 1 dodań i 3 usunięć

Wyświetl plik

@ -351,11 +351,9 @@ STATIC mp_obj_t set_issuperset_proper(mp_obj_t self_in, mp_obj_t other_in) {
}
STATIC mp_obj_t set_equal(mp_obj_t self_in, mp_obj_t other_in) {
assert(is_set_or_frozenset(other_in));
check_set_or_frozenset(self_in);
mp_obj_set_t *self = MP_OBJ_TO_PTR(self_in);
if (!is_set_or_frozenset(other_in)) {
return mp_const_false;
}
mp_obj_set_t *other = MP_OBJ_TO_PTR(other_in);
if (self->set.used != other->set.used) {
return mp_const_false;