From: Mariatta Date: Thu, 1 Jun 2017 02:49:30 +0000 (-0700) Subject: bpo-22702: Clarify documentation of str.join & bytes.join (GH-156) (GH-1898) X-Git-Tag: v2.7.14rc1~121 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9139f23464ed0f71cb0e34a535a5b7ddf7fad748;p=python bpo-22702: Clarify documentation of str.join & bytes.join (GH-156) (GH-1898) 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) --- diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index bd3a17942f..f0ecd96d93 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1068,9 +1068,10 @@ string functions based on regular expressions. .. method:: str.join(iterable) - 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. + 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])