Skip to content

Commit d3b2c6e

Browse files
committed
py/objtuple: Remove code that handles tuple-subclass equality test.
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.
1 parent 819380c commit d3b2c6e

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

py/objtuple.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,6 @@ STATIC mp_obj_t tuple_cmp_helper(mp_uint_t op, mp_obj_t self_in, mp_obj_t anothe
111111
// Slow path for user subclasses
112112
another_in = mp_instance_cast_to_native_base(another_in, MP_OBJ_FROM_PTR(&mp_type_tuple));
113113
if (another_in == MP_OBJ_NULL) {
114-
if (op == MP_BINARY_OP_EQUAL) {
115-
return mp_const_false;
116-
}
117114
return MP_OBJ_NULL;
118115
}
119116
}

0 commit comments

Comments
 (0)