A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-August/048279.html below:

[Python-Dev] Re: PEP 292 - Simpler String Substitutions

[Python-Dev] Re: PEP 292 - Simpler String Substitutions [Python-Dev] Re: PEP 292 - Simpler String SubstitutionsTim Peters tim.peters at gmail.com
Tue Aug 24 04:05:00 CEST 2004
[Clark C. Evans]
> This code-snippet is littered everwhere in my applications:
>
>    string.join([str(x) for x in iterable])
>
> Its tedious and makes code hard to read.  Do we need a PEP to fix
> this?

You won't need a PEP to replace it with the similar code-snippet from my code:

    string.join(map(str, iterable))

Same thing in the end, but map reads quite well (perhaps even better
than a listcomp) in applications as simple as this.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4