Joining strings versus augmented assignment

Delaney, Timothy C (Timothy) tdelaney at
Tue Feb 4 05:01:37 CET 2003

> From: Bengt Richter [mailto:bokr at]
> IMO we need to keep in mind that the language is not defined 
> by accidental
> details of implementation, and try to avoid leading people 
> into believing
> that bad peformance for certain operations is necessarily 
> cast in concrete.

Indeed. If you are using Psyco for example, string concatenation is converted into a list join whereever possible.

So in that case, the two are fairly equivalent.

Nonetheless, I often find building up a string in a list and then joining it to be better both conceptually and in terms of readability. String concatenation can start to look messy very quickly ...

Tim Delaney

More information about the Python-list mailing list