[Python-checkins] CVS: python/dist/src/Objects listobject.c,2.94,2.95
Tim Peters
tim_one@users.sourceforge.net
Sat, 26 May 2001 12:37:56 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv18842/python/dist/src/Objects
Modified Files:
listobject.c
Log Message:
Change list.extend() error msgs and NEWS to reflect that list.extend()
now takes any iterable argument, not only sequences.
NEEDS DOC CHANGES -- but I don't think we settled on a concise way to
say this stuff.
Index: listobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v
retrieving revision 2.94
retrieving revision 2.95
diff -C2 -r2.94 -r2.95
*** listobject.c 2001/05/26 05:50:03 2.94
--- listobject.c 2001/05/26 19:37:54 2.95
***************
*** 645,649 ****
list_inplace_concat(PyListObject *self, PyObject *other)
{
! other = PySequence_Fast(other, "argument to += must be a sequence");
if (!other)
return NULL;
--- 645,649 ----
list_inplace_concat(PyListObject *self, PyObject *other)
{
! other = PySequence_Fast(other, "argument to += must be iterable");
if (!other)
return NULL;
***************
*** 665,669 ****
return NULL;
! b = PySequence_Fast(b, "list.extend() argument must be a sequence");
if (!b)
return NULL;
--- 665,669 ----
return NULL;
! b = PySequence_Fast(b, "list.extend() argument must be iterable");
if (!b)
return NULL;