Skip to content

Commit f8b63a5

Browse files
committed
Fix 'w' type check
1 parent 01b58de commit f8b63a5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/descrobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,7 @@ mappingproxy_richcompare(PyObject *self, PyObject *w, int op)
12341234
{
12351235
if (op == Py_EQ || op == Py_NE) {
12361236
mappingproxyobject *v = (mappingproxyobject *)self;
1237-
if (Py_TYPE(w) == Py_TYPE(self)) {
1237+
if (PyObject_TypeCheck(w, &PyDictProxy_Type)) {
12381238
w = ((mappingproxyobject *)w)->mapping;
12391239
}
12401240

0 commit comments

Comments
 (0)