]> granicus.if.org Git - python/commitdiff
bpo-22702: Clarify documentation of str.join & bytes.join (GH-156) (GH-1897)
authorMariatta <Mariatta@users.noreply.github.com>
Thu, 1 Jun 2017 02:49:01 +0000 (19:49 -0700)
committerGitHub <noreply@github.com>
Thu, 1 Jun 2017 02:49:01 +0000 (19:49 -0700)
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.
(cherry picked from commit 08e2f355d04d3cbea5751ce1275306ee3f569b32)

Doc/library/stdtypes.rst

index af0a7b7fe939b2a8831aed21a4f2da2a8670ac53..4272b96fecfa21b92c4e36ba07bd2226f7e34062 100644 (file)
@@ -1719,10 +1719,10 @@ expression support in the :mod:`re` module).
 
 .. method:: str.join(iterable)
 
-   Return a string which is the concatenation of the strings in the
-   :term:`iterable` *iterable*.  A :exc:`TypeError` will be raised if there are
-   any non-string values in *iterable*, including :class:`bytes` objects.  The
-   separator between elements is the string providing this method.
+   Return a string which is the concatenation of the strings in *iterable*.
+   A :exc:`TypeError` will be raised if there are any non-string values in
+   *iterable*, including :class:`bytes` objects.  The separator between
+   elements is the string providing this method.
 
 
 .. method:: str.ljust(width[, fillchar])
@@ -2539,11 +2539,11 @@ arbitrary binary data.
             bytearray.join(iterable)
 
    Return a bytes or bytearray object which is the concatenation of the
-   binary data sequences in the :term:`iterable` *iterable*.  A
-   :exc:`TypeError` will be raised if there are any values in *iterable*
-   that are not :term:`bytes-like objects <bytes-like object>`, including
-   :class:`str` objects.  The separator between elements is the contents
-   of the bytes or bytearray object providing this method.
+   binary data sequences in *iterable*.  A :exc:`TypeError` will be raised
+   if there are any values in *iterable* that are not :term:`bytes-like
+   objects <bytes-like object>`, including :class:`str` objects.  The
+   separator between elements is the contents of the bytes or
+   bytearray object providing this method.
 
 
 .. staticmethod:: bytes.maketrans(from, to)