gh-100239: fix bug in comparison (#132093) · python/cpython@68e72cf

GitHub

Original file line numberDiff line numberDiff line change@@ -2382,11 +2382,11 @@ binary_op_fail_kind(int oparg, PyObject *lhs, PyObject *rhs)

23822382returnSPEC_FAIL_BINARY_OP_SUBSCR_DEQUE;

23832383 }

238423842385-if (strcmp(_PyType_Name(container_type), "EnumDict") !=0) {

2385+if (strcmp(_PyType_Name(container_type), "EnumDict") ==0) {

23862386returnSPEC_FAIL_BINARY_OP_SUBSCR_ENUMDICT;

23872387 }

238823882389-if (strcmp(container_type->tp_name, "StackSummary") !=0) {

2389+if (strcmp(container_type->tp_name, "StackSummary") ==0) {

23902390returnSPEC_FAIL_BINARY_OP_SUBSCR_STACKSUMMARY;

23912391 }

23922392