Skip to content

Commit 8013782

Browse files
committed
Update __dict__ assignment error message
1 parent 8d6ec8d commit 8013782

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Objects/typeobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4001,8 +4001,8 @@ _PyObject_SetDict(PyObject *obj, PyObject *value)
40014001
{
40024002
if (value != NULL && !PyAnyDict_Check(value)) {
40034003
PyErr_Format(PyExc_TypeError,
4004-
"__dict__ must be set to a dictionary, "
4005-
"not a '%.200s'", Py_TYPE(value)->tp_name);
4004+
"__dict__ must be set to a dict or frozendict, "
4005+
"not a %T", value);
40064006
return -1;
40074007
}
40084008
if (Py_TYPE(obj)->tp_flags & Py_TPFLAGS_MANAGED_DICT) {

0 commit comments

Comments
 (0)