diff options
author | Georg Brandl <georg@python.org> | 2009-10-14 18:48:32 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-10-14 18:48:32 (GMT) |
commit | 9b4e5820cb942973056c5512bc79a2701b956e45 (patch) | |
tree | 8e03e500f3552e5fb6c6f09c152563eff440d61e | |
parent | bb86314d227aa1b695b7c968a2cdf42146cacf29 (diff) | |
download | cpython-9b4e5820cb942973056c5512bc79a2701b956e45.zip cpython-9b4e5820cb942973056c5512bc79a2701b956e45.tar.gz cpython-9b4e5820cb942973056c5512bc79a2701b956e45.tar.bz2 |
#7116: str.join() takes an iterable.
-rw-r--r-- | Doc/library/stdtypes.rst | 7 | ||||
-rw-r--r-- | Objects/stringobject.c | 4 | ||||
-rw-r--r-- | 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) |