// Note: strangely, if you pass dict.values(), this check does not work
if (!PyIter_Check(X)) {
PyErr_Format(PyExc_TypeError, "`%s' requires an iterable for parameter `X', but you passed `%s' which does not implement the iterator protocol", Py_TYPE(self)->tp_name, Py_TYPE(X)->tp_name);