diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-05-26 19:37:54 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-05-26 19:37:54 (GMT) |
commit | 1af03e98d9ab87b4e9aa76caafba0dbc52cfd750 (patch) | |
tree | bf7fbe37bc2ef4cfef5f675a29da674b0d80b814 /Objects/listobject.c | |
parent | 442914d265b9752f78251e3792f5155f14a9dcc9 (diff) | |
download | cpython-1af03e98d9ab87b4e9aa76caafba0dbc52cfd750.zip cpython-1af03e98d9ab87b4e9aa76caafba0dbc52cfd750.tar.gz cpython-1af03e98d9ab87b4e9aa76caafba0dbc52cfd750.tar.bz2 |
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.
Diffstat (limited to 'Objects/listobject.c')
-rw-r--r-- | Objects/listobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c index 9fb3e82..e595c85 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -644,7 +644,7 @@ listextend_internal(PyListObject *self, PyObject *b) static PyObject * list_inplace_concat(PyListObject *self, PyObject *other) { - other = PySequence_Fast(other, "argument to += must be a sequence"); + other = PySequence_Fast(other, "argument to += must be iterable"); if (!other) return NULL; @@ -664,7 +664,7 @@ listextend(PyListObject *self, PyObject *args) if (!PyArg_ParseTuple(args, "O:extend", &b)) return NULL; - b = PySequence_Fast(b, "list.extend() argument must be a sequence"); + b = PySequence_Fast(b, "list.extend() argument must be iterable"); if (!b) return NULL; |