Skip to content

Commit 332353e

Browse files
committed
Use PyFrozenDict_Check() in dict_unhashable_type()
Replace PyObject_IsInstance(op, &PyFrozenDict_Type) with PyFrozenDict_Check().
1 parent 4a5a8e6 commit 332353e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/dictobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2407,7 +2407,7 @@ dict_unhashable_type(PyObject *op, PyObject *key)
24072407
}
24082408

24092409
const char *errmsg;
2410-
if (PyObject_IsInstance(op, (PyObject*)&PyFrozenDict_Type)) {
2410+
if (PyFrozenDict_Check(op)) {
24112411
errmsg = "cannot use '%T' as a frozendict key (%S)";
24122412
}
24132413
else {

0 commit comments

Comments
 (0)