Re: [Tutor] Concatenation vs formatting

2008-09-01 Thread John Fouhy
2008/9/1 Richard Lovely <[EMAIL PROTECTED]>: > Just a couple of quick questions: > What differences are there in efficency (i.e. time and memory) between > string concatenation ("foo" + "bar") and printf style formatting > ("%s%s" % ("foo","bar")). The timeit module may provide some insight: Morp

Re: [Tutor] Concatenation vs formatting

2008-09-01 Thread bob gailer
Richard Lovely wrote: Just a couple of quick questions: What differences are there in efficency (i.e. time and memory) between string concatenation ("foo" + "bar") and printf style formatting ("%s%s" % ("foo","bar")). Is there any place where one is better than the othe concatenation should be mo

[Tutor] Concatenation vs formatting

2008-09-01 Thread Richard Lovely
Just a couple of quick questions: What differences are there in efficency (i.e. time and memory) between string concatenation ("foo" + "bar") and printf style formatting ("%s%s" % ("foo","bar")). Is there any place where one is better than the other, and any places where either should be avoided?