]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-100239: fix bug in comparison (#132093)
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>
Fri, 4 Apr 2025 17:09:49 +0000 (18:09 +0100)
committerGitHub <noreply@github.com>
Fri, 4 Apr 2025 17:09:49 +0000 (18:09 +0100)
Python/specialize.c

index e7924aa711efa328d6b01ad01e7969bc170c6ba3..f73f322f0c97256f4c297d3058aa78502951599c 100644 (file)
@@ -2382,11 +2382,11 @@ binary_op_fail_kind(int oparg, PyObject *lhs, PyObject *rhs)
                 return SPEC_FAIL_BINARY_OP_SUBSCR_DEQUE;
             }
 
-            if (strcmp(_PyType_Name(container_type), "EnumDict") != 0) {
+            if (strcmp(_PyType_Name(container_type), "EnumDict") == 0) {
                 return SPEC_FAIL_BINARY_OP_SUBSCR_ENUMDICT;
             }
 
-            if (strcmp(container_type->tp_name, "StackSummary") != 0) {
+            if (strcmp(container_type->tp_name, "StackSummary") == 0) {
                 return SPEC_FAIL_BINARY_OP_SUBSCR_STACKSUMMARY;
             }