From: Georg Brandl Date: Wed, 14 Oct 2009 18:48:32 +0000 (+0000) Subject: #7116: str.join() takes an iterable. X-Git-Tag: v2.7a1~351 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b4e5820cb942973056c5512bc79a2701b956e45;p=python #7116: str.join() takes an iterable. --- diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 25fda8f9d7..b4f62add5e 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 1233fc0cc9..70d90d4ee7 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 2028d96b6b..6eac358b67 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)