[issue23179] New function proposal: string.from_iterable(iterable [, map_function])

Josh Rosenberg report at bugs.python.org
Wed Jan 7 03:11:09 CET 2015


Josh Rosenberg added the comment:

I'll note: "".join(map(str, iterable)) will solve problem #1. It's fast, uses existing built-ins, and is relatively intuitive. I know map is sometimes considered Pythonic, but "".join(str(x) for x in iterable) is an equally effective, if somewhat slower, alternative that can't be called un-Pythonic.

I have no idea why you think "".join(iterable) is not Pythonic, it's *the* way to join strings into a single string. Fast, direct, simple. string.from_iterable seems like a silly way to do what "".join(map(INSERTFAVORITEFUNCTIONHERE, iterable)) does already, for no gain.

----------
nosy: +josh.r

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23179>
_______________________________________


More information about the Python-bugs-list mailing list