[Python-checkins] CVS: python/dist/src/Objects abstract.c,2.81,2.82 classobject.c,2.150,2.151 typeobject.c,2.77,2.78
Tim Peters
tim_one@users.sourceforge.net
Sat, 29 Sep 2001 22:58:44 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv27904/python/Objects
Modified Files:
abstract.c classobject.c typeobject.c
Log Message:
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".
Index: abstract.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v
retrieving revision 2.81
retrieving revision 2.82
diff -C2 -d -r2.81 -r2.82
*** abstract.c 2001/09/29 01:05:03 2.81
--- abstract.c 2001/09/30 05:58:41 2.82
***************
*** 1860,1864 ****
if (PySequence_Check(o))
return PySeqIter_New(o);
! PyErr_SetString(PyExc_TypeError, "iter() of non-sequence");
return NULL;
}
--- 1860,1864 ----
if (PySequence_Check(o))
return PySeqIter_New(o);
! PyErr_SetString(PyExc_TypeError, "iteration over non-sequence");
return NULL;
}
Index: classobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/classobject.c,v
retrieving revision 2.150
retrieving revision 2.151
diff -C2 -d -r2.150 -r2.151
*** classobject.c 2001/09/20 21:45:26 2.150
--- classobject.c 2001/09/30 05:58:41 2.151
***************
*** 1840,1844 ****
PyErr_Clear();
if ((func = instance_getattr(self, getitemstr)) == NULL) {
! PyErr_SetString(PyExc_TypeError, "iter() of non-sequence");
return NULL;
}
--- 1840,1844 ----
PyErr_Clear();
if ((func = instance_getattr(self, getitemstr)) == NULL) {
! PyErr_SetString(PyExc_TypeError, "iteration over non-sequence");
return NULL;
}
Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.77
retrieving revision 2.78
diff -C2 -d -r2.77 -r2.78
*** typeobject.c 2001/09/28 22:58:52 2.77
--- typeobject.c 2001/09/30 05:58:42 2.78
***************
*** 3262,3266 ****
func = lookup_method(self, "__getitem__", &getitem_str);
if (func == NULL) {
! PyErr_SetString(PyExc_TypeError, "iter() of non-sequence");
return NULL;
}
--- 3262,3266 ----
func = lookup_method(self, "__getitem__", &getitem_str);
if (func == NULL) {
! PyErr_SetString(PyExc_TypeError, "iteration over non-sequence");
return NULL;
}