This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: str.join() should be documented as taking an iterable
Type: behavior Stage:
Components: Documentation, Interpreter Core Versions: Python 3.0, Python 2.4, Python 3.1, Python 2.7, Python 2.6, Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: georg.brandl, jess.austin
Priority: normal Keywords: patch

Created on 2009-10-12 22:37 by jess.austin, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
jointakesiterables.diff jess.austin, 2009-10-12 22:48 patch to __doc__ strings and stdtypes documentation
Messages (2)
msg93909 - (view) Author: Jess Austin (jess.austin) Date: 2009-10-12 22:37
In its __doc__ string and in the documentation, str.join() is described
as taking a sequence.  This is not general enough; it actually takes any
iterable of strings:

    >>> ','.join(str(x) for x in range(5))
    '0,1,2,3,4'

Maybe this is a small nit to pick, but it slowed me down for a few
minutes, and I already vaguely remembered that str.join() could handle
iterables.
msg94009 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-10-14 18:48
Thanks, fixed in r75418.
History
Date User Action Args
2022-04-11 14:56:53adminsetgithub: 51365
2009-10-14 18:48:41georg.brandlsetstatus: open -> closed
resolution: fixed
messages: + msg94009
2009-10-12 22:48:54jess.austinsetfiles: + jointakesiterables.diff
keywords: + patch
2009-10-12 22:37:39jess.austincreate