summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-09-27 18:01:22 (GMT)
committerGuido van Rossum <guido@python.org>2007-09-27 18:01:22 (GMT)
commitf1044293fa36667b5ba11fbc7acac21a03b82710 (patch)
tree41aac1b32323f1ae889d88c097157d330dc1aff7 /Doc
parent4e02c503e789337b07cc14ece3f5adbf23732c89 (diff)
downloadcpython-f1044293fa36667b5ba11fbc7acac21a03b82710.zip
cpython-f1044293fa36667b5ba11fbc7acac21a03b82710.tar.gz
cpython-f1044293fa36667b5ba11fbc7acac21a03b82710.tar.bz2
Patch # 1145 by Thomas Lee:
str.join(...) now applies str() to the sequence elements if they're not strings alraedy, except for bytes, which still raise TypeError (for the same reasons why ""==b"" raises it).
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/stdtypes.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 1a0bdf3..136a8d5 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -789,8 +789,11 @@ functions based on regular expressions.
.. method:: str.join(seq)
- Return a string which is the concatenation of the strings in the sequence *seq*.
- The separator between elements is the string providing this method.
+ Return a string which is the concatenation of the values in the sequence
+ *seq*. Non-string values in *seq* will be converted to a string using their
+ respective ``str()`` value. If there are any :class:`bytes` objects in
+ *seq*, a :exc:`TypeError` will be raised. The separator between elements is
+ the string providing this method.
.. method:: str.ljust(width[, fillchar])