mirror of https://github.com/python/cpython
#7116: str.join() takes an iterable.
This commit is contained in:
parent
bb86314d22
commit
9b4e5820cb
|
@ -996,10 +996,11 @@ string functions based on regular expressions.
|
||||||
For 8-bit strings, this method is locale-dependent.
|
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*.
|
Return a string which is the concatenation of the strings in the
|
||||||
The separator between elements is the string providing this method.
|
:term:`iterable` *iterable*. The separator between elements is the string
|
||||||
|
providing this method.
|
||||||
|
|
||||||
|
|
||||||
.. method:: str.ljust(width[, fillchar])
|
.. method:: str.ljust(width[, fillchar])
|
||||||
|
|
|
@ -1814,10 +1814,10 @@ onError:
|
||||||
|
|
||||||
|
|
||||||
PyDoc_STRVAR(join__doc__,
|
PyDoc_STRVAR(join__doc__,
|
||||||
"S.join(sequence) -> string\n\
|
"S.join(iterable) -> string\n\
|
||||||
\n\
|
\n\
|
||||||
Return a string which is the concatenation of the strings in the\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 *
|
static PyObject *
|
||||||
string_join(PyStringObject *self, PyObject *orig)
|
string_join(PyStringObject *self, PyObject *orig)
|
||||||
|
|
|
@ -7154,10 +7154,10 @@ unicode_isnumeric(PyUnicodeObject *self)
|
||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(join__doc__,
|
PyDoc_STRVAR(join__doc__,
|
||||||
"S.join(sequence) -> unicode\n\
|
"S.join(iterable) -> unicode\n\
|
||||||
\n\
|
\n\
|
||||||
Return a string which is the concatenation of the strings in the\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*
|
static PyObject*
|
||||||
unicode_join(PyObject *self, PyObject *data)
|
unicode_join(PyObject *self, PyObject *data)
|
||||||
|
|
Loading…
Reference in New Issue