[Python-ideas] Add list.join() please

David Mertz mertz at gnosis.cx
Tue Jan 29 22:46:11 EST 2019

Of course not! The request was for something that worked on Python
*collections*. If the OP wanted something that worked on iterables in
general, we'd need a different function with different behavior.

Of course, it also doesn't work on dictionaries. I don't really have any
ideas what the desired behavior might be for dicts. Various things are
conceivable, none obvious. But it's fine on lists, sets, tuples, deques,
and some other things that are roughly sequence-like.

On Tue, Jan 29, 2019, 10:38 PM Robert Vanden Eynde <robertve92 at gmail.com

> stringify = lambda it: type(it)(map(str, it))
> stringify(range(5)) doesn't work ^^
> One advantage or having a standard function is that it has been designed
> by a lot of persons for all possible use cases :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20190129/94731de6/attachment-0001.html>

More information about the Python-ideas mailing list