give non-iterable TypeError a message (closes #20507)

This commit is contained in:
Benjamin Peterson 2014-02-15 13:02:52 -05:00
parent e426b71789
commit 9743b2c2b5

View file

@ -9493,7 +9493,7 @@ PyUnicode_Join(PyObject *separator, PyObject *seq)
PyObject *last_obj;
unsigned int kind = 0;
fseq = PySequence_Fast(seq, "");
fseq = PySequence_Fast(seq, "can only join an iterable");
if (fseq == NULL) {
return NULL;
}