From d3b2c6e44c25ef6714d767e4da4e808a7ba80f23 Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 18 Feb 2020 22:45:25 +1100 Subject: [PATCH] py/objtuple: Remove code that handles tuple-subclass equality test. Since commit 3aab54bf434e7f025a91ea05052f1bac439fad8c 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. --- py/objtuple.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/py/objtuple.c b/py/objtuple.c index 10a5e586f6..7df7a3a6e4 100644 --- a/py/objtuple.c +++ b/py/objtuple.c @@ -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; } }