Commit 125a612f authored by Benjamin Peterson's avatar Benjamin Peterson

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

parent 494f32c7
...@@ -9493,7 +9493,7 @@ PyUnicode_Join(PyObject *separator, PyObject *seq) ...@@ -9493,7 +9493,7 @@ PyUnicode_Join(PyObject *separator, PyObject *seq)
PyObject *last_obj; PyObject *last_obj;
unsigned int kind = 0; unsigned int kind = 0;
fseq = PySequence_Fast(seq, ""); fseq = PySequence_Fast(seq, "can only join an iterable");
if (fseq == NULL) { if (fseq == NULL) {
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment