[New-bugs-announce] [issue7116] str.join() should be documented as taking an iterable
Jess Austin
report at bugs.python.org
Tue Oct 13 00:37:41 CEST 2009
New submission from Jess Austin <jess.austin at gmail.com>:
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.
----------
assignee: georg.brandl
components: Documentation, Interpreter Core
messages: 93909
nosy: georg.brandl, jess.austin
severity: normal
status: open
title: str.join() should be documented as taking an iterable
type: behavior
versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7116>
_______________________________________
More information about the New-bugs-announce
mailing list