Skip to content

Commit

Permalink
py/objtuple: Remove code that handles tuple-subclass equality test.
Browse files Browse the repository at this point in the history
Since commit 3aab54b this piece of code is
no longer needed because the top-level function mp_obj_equal_not_equal()
now handles the case of user types, and will never call tuple's binary_op
function with MP_BINARY_OP_EQUAL and a non-tuple on the RHS.
  • Loading branch information
dpgeorge committed Feb 19, 2020
1 parent 819380c commit d3b2c6e
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions py/objtuple.c
Expand Up @@ -111,9 +111,6 @@ STATIC mp_obj_t tuple_cmp_helper(mp_uint_t op, mp_obj_t self_in, mp_obj_t anothe
// Slow path for user subclasses
another_in = mp_instance_cast_to_native_base(another_in, MP_OBJ_FROM_PTR(&mp_type_tuple));
if (another_in == MP_OBJ_NULL) {
if (op == MP_BINARY_OP_EQUAL) {
return mp_const_false;
}
return MP_OBJ_NULL;
}
}
Expand Down

0 comments on commit d3b2c6e

Please sign in to comment.