bpo-22702: Clarify documentation of str.join & bytes.join (GH-156) (G… · python/cpython@1721b06 (original) (raw)

Original file line number Diff line number Diff line change
@@ -1714,10 +1714,10 @@ expression support in the :mod:`re` module).
1714 1714
1715 1715 .. method:: str.join(iterable)
1716 1716
1717 - Return a string which is the concatenation of the strings in the
1718 -:term:`iterable` *iterable*. A :exc:`TypeError` will be raised if there are
1719 -any non-string values in *iterable*, including :class:`bytes` objects. The
1720 -separator between elements is the string providing this method.
1717 + Return a string which is the concatenation of the strings in *iterable*.
1718 + A :exc:`TypeError` will be raised if there are any non-string values in
1719 + *iterable*, including :class:`bytes` objects. The separator between
1720 + elements is the string providing this method.
1721 1721
1722 1722
1723 1723 .. method:: str.ljust(width[, fillchar])
@@ -2533,11 +2533,11 @@ arbitrary binary data.
2533 2533 bytearray.join(iterable)
2534 2534
2535 2535 Return a bytes or bytearray object which is the concatenation of the
2536 - binary data sequences in the :term:`iterable` *iterable*. A
2537 -:exc:`TypeError` will be raised if there are any values in *iterable*
2538 -that are not :term:`bytes-like objects `, including
2539 -:class:`str` objects. The separator between elements is the contents
2540 -of the bytes or bytearray object providing this method.
2536 + binary data sequences in *iterable*. A :exc:`TypeError` will be raised
2537 + if there are any values in *iterable* that are not :term:`bytes-like
2538 + objects `, including :class:`str` objects. The
2539 + separator between elements is the contents of the bytes or
2540 + bytearray object providing this method.
2541 2541
2542 2542
2543 2543 .. staticmethod:: bytes.maketrans(from, to)