mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
bpo-22702: Clarify documentation of str.join & bytes.join (GH-156)
The "iterable iterable" phrasing created confusion between the term reference and the parameter name. This simplifies the phrasing to just use the parameter name without linking directly to the term definition.
This commit is contained in:
parent
2b44e302ec
commit
08e2f355d0
1 changed files with 9 additions and 9 deletions
|
@ -1719,10 +1719,10 @@ expression support in the :mod:`re` module).
|
||||||
|
|
||||||
.. method:: str.join(iterable)
|
.. method:: str.join(iterable)
|
||||||
|
|
||||||
Return a string which is the concatenation of the strings in the
|
Return a string which is the concatenation of the strings in *iterable*.
|
||||||
:term:`iterable` *iterable*. A :exc:`TypeError` will be raised if there are
|
A :exc:`TypeError` will be raised if there are any non-string values in
|
||||||
any non-string values in *iterable*, including :class:`bytes` objects. The
|
*iterable*, including :class:`bytes` objects. The separator between
|
||||||
separator between elements is the string providing this method.
|
elements is the string providing this method.
|
||||||
|
|
||||||
|
|
||||||
.. method:: str.ljust(width[, fillchar])
|
.. method:: str.ljust(width[, fillchar])
|
||||||
|
@ -2554,11 +2554,11 @@ arbitrary binary data.
|
||||||
bytearray.join(iterable)
|
bytearray.join(iterable)
|
||||||
|
|
||||||
Return a bytes or bytearray object which is the concatenation of the
|
Return a bytes or bytearray object which is the concatenation of the
|
||||||
binary data sequences in the :term:`iterable` *iterable*. A
|
binary data sequences in *iterable*. A :exc:`TypeError` will be raised
|
||||||
:exc:`TypeError` will be raised if there are any values in *iterable*
|
if there are any values in *iterable* that are not :term:`bytes-like
|
||||||
that are not :term:`bytes-like objects <bytes-like object>`, including
|
objects <bytes-like object>`, including :class:`str` objects. The
|
||||||
:class:`str` objects. The separator between elements is the contents
|
separator between elements is the contents of the bytes or
|
||||||
of the bytes or bytearray object providing this method.
|
bytearray object providing this method.
|
||||||
|
|
||||||
|
|
||||||
.. staticmethod:: bytes.maketrans(from, to)
|
.. staticmethod:: bytes.maketrans(from, to)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue