Check for a common user error with defaultdict().
diff --git a/Modules/collectionsmodule.c b/Modules/collectionsmodule.c
index a4cdcfa..f98bd49 100644
--- a/Modules/collectionsmodule.c
+++ b/Modules/collectionsmodule.c
@@ -1252,8 +1252,14 @@
 		newargs = PyTuple_New(0);
 	else {
 		Py_ssize_t n = PyTuple_GET_SIZE(args);
-		if (n > 0)
+		if (n > 0) {
 			newdefault = PyTuple_GET_ITEM(args, 0);
+			if (!PyCallable_Check(newdefault)) {
+				PyErr_SetString(PyExc_TypeError,
+					"first argument must be callable");                           
+				return -1;
+			}
+		}
 		newargs = PySequence_GetSlice(args, 1, n);
 	}
 	if (newargs == NULL)