[Python-Dev] Usage of += on strings in loops in stdlib (original) (raw)
Serhiy Storchaka storchaka at gmail.com
Wed Feb 13 13:10:56 CET 2013
- Previous message: [Python-Dev] Usage of += on strings in loops in stdlib
- Next message: [Python-Dev] Usage of += on strings in loops in stdlib
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 13.02.13 10:52, Larry Hastings wrote:
I've always hated the "".join(array) idiom for "fast" string concatenation--it's ugly and it flies in the face of TOOWTDI. I think everyone should use "x = a + b + c + d" for string concatenation, and we should just make that fast.
I prefer "x = '%s%s%s%s' % (a, b, c, d)" when string's number is more than 3 and some of them are literal strings.
- Previous message: [Python-Dev] Usage of += on strings in loops in stdlib
- Next message: [Python-Dev] Usage of += on strings in loops in stdlib
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]