diff options
author | Raymond Hettinger <python@rcn.com> | 2015-07-20 07:08:09 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2015-07-20 07:08:09 (GMT) |
commit | fe13eac341a72428259b404dee31f9743d352575 (patch) | |
tree | a3bbbb2d7f8450a69ff51ee02e7cdfa010d84407 | |
parent | 58785d545082d800a6388f8d80423acce970df40 (diff) | |
download | cpython-fe13eac341a72428259b404dee31f9743d352575.zip cpython-fe13eac341a72428259b404dee31f9743d352575.tar.gz cpython-fe13eac341a72428259b404dee31f9743d352575.tar.bz2 |
Issue #19663: Improve error message for defaultdict.
-rw-r--r-- | Modules/_collectionsmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index 5080a5b..f8b3783 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -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; } } |