[New-bugs-announce] [issue32640] Python 2.7 str.join documentation is incorrect

Malcolm Smith report at bugs.python.org
Tue Jan 23 16:32:21 EST 2018

New submission from Malcolm Smith <malcolm.smith at gmail.com>:

At some point the Python 3 documentation of str.join has been copied to Python 2. This includes the sentence "A TypeError will be raised if there are any non-string values in iterable, including bytes objects." 

The second half of this sentence is wrong for Python 2. Not only is there no "bytes" type in Python 2, but join() in this version will happily join any mixture of unicode and (byte-)str objects, producing unicode output if any of the items (or separator) were unicode.


assignee: docs at python
components: Documentation
messages: 310525
nosy: Malcolm Smith, docs at python
priority: normal
severity: normal
status: open
title: Python 2.7 str.join documentation is incorrect
type: behavior
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list