Paul Rubin wrote: > Georg Brandl <[EMAIL PROTECTED]> writes: >> Why would you try to sum up strings? Besides, the ''.join idiom is quite >> common in Python. > > Just because it's common doesn't mean it's obvious. In my opinion > it's as ugly as sin, and the fact that it's an idiom shows a > shortcoming in Python. The obvious reason for summing strings is that > it's a long-established feature of Python that a+b concatenates two > strings, so summing a,b,c,d,e should result in a+b+c+d+e.
Which is exactly how I would concatenate five strings. For concatenating longer sequences of strings, however, if it needs to be done fast, performance-wise, this approach is not sensible. Georg -- http://mail.python.org/mailman/listinfo/python-list