Issue #19663: Improve error message for defaultdict.

This commit is contained in:
Raymond Hettinger 2015-07-20 03:08:09 -04:00
parent 58785d5450
commit fe13eac341
1 changed files with 1 additions and 1 deletions

View File

@ -1595,7 +1595,7 @@ defdict_init(PyObject *self, PyObject *args, PyObject *kwds)
newdefault = PyTuple_GET_ITEM(args, 0);
if (!PyCallable_Check(newdefault) && newdefault != Py_None) {
PyErr_SetString(PyExc_TypeError,
"first argument must be callable");
"first argument must be callable or None");
return -1;
}
}