gh-100239: fix bug in comparison (#132093)

This commit is contained in:
Irit Katriel 2025-04-04 18:09:49 +01:00 committed by GitHub
parent 0a97427ee5
commit 68e72cf3a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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;
}