
Aug. 24, 2004
2:05 a.m.
[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.