From 239aba7874d83eee798b19fe3fc11880516fb356 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Mon, 20 Jul 2015 03:09:22 -0400 Subject: Issue #19663: Improve error message for defaultdict. --- Modules/_collectionsmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index 627fad5..65803a4 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -1682,7 +1682,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; } } -- cgit v0.12