From 9b4e5820cb942973056c5512bc79a2701b956e45 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Wed, 14 Oct 2009 18:48:32 +0000 Subject: #7116: str.join() takes an iterable. --- Doc/library/stdtypes.rst | 7 ++++--- Objects/stringobject.c | 4 ++-- Objects/unicodeobject.c | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 25fda8f..b4f62ad 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -996,10 +996,11 @@ string functions based on regular expressions. For 8-bit strings, this method is locale-dependent. -.. method:: str.join(seq) +.. method:: str.join(iterable) - Return a string which is the concatenation of the strings in the sequence *seq*. - The separator between elements is the string providing this method. + Return a string which is the concatenation of the strings in the + :term:`iterable` *iterable*. The separator between elements is the string + providing this method. .. method:: str.ljust(width[, fillchar]) diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 1233fc0..70d90d4 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -1814,10 +1814,10 @@ onError: PyDoc_STRVAR(join__doc__, -"S.join(sequence) -> string\n\ +"S.join(iterable) -> string\n\ \n\ Return a string which is the concatenation of the strings in the\n\ -sequence. The separator between elements is S."); +iterable. The separator between elements is S."); static PyObject * string_join(PyStringObject *self, PyObject *orig) diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 2028d96..6eac358 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -7154,10 +7154,10 @@ unicode_isnumeric(PyUnicodeObject *self) } PyDoc_STRVAR(join__doc__, - "S.join(sequence) -> unicode\n\ + "S.join(iterable) -> unicode\n\ \n\ Return a string which is the concatenation of the strings in the\n\ -sequence. The separator between elements is S."); +iterable. The separator between elements is S."); static PyObject* unicode_join(PyObject *self, PyObject *data) -- cgit v0.12