mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
SF bug [#466173] unpack TypeError unclear
Replaced 3 instances of "iter() of non-sequence" with "iteration over non-sequence". Restored "unpack non-sequence" for stuff like "a, b = 1".
This commit is contained in:
parent
d38b1c74f3
commit
8b13b3ede2
4 changed files with 8 additions and 4 deletions
|
|
@ -3261,7 +3261,7 @@ slot_tp_iter(PyObject *self)
|
|||
PyErr_Clear();
|
||||
func = lookup_method(self, "__getitem__", &getitem_str);
|
||||
if (func == NULL) {
|
||||
PyErr_SetString(PyExc_TypeError, "iter() of non-sequence");
|
||||
PyErr_SetString(PyExc_TypeError, "iteration over non-sequence");
|
||||
return NULL;
|
||||
}
|
||||
Py_DECREF(func);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue