New submission from Jess Austin <jess.aus...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue7116>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to