New submission from Malcolm Smith <malcolm.sm...@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. https://docs.python.org/2/library/stdtypes.html#str.join ---------- assignee: docs@python components: Documentation messages: 310525 nosy: Malcolm Smith, docs@python priority: normal severity: normal status: open title: Python 2.7 str.join documentation is incorrect type: behavior versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32640> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com