Re: [Python-Dev] PATCH submitted: Speed up + for string concatenation, now as fast as "".join(x) idiom

2006-10-05 Thread Gregory P. Smith
> I've never liked the "".join([]) idiom for string concatenation; in my > opinion it violates the principles "Beautiful is better than ugly." and > "There should be one-- and preferably only one --obvious way to do it.". > (And perhaps several others.) To that end I've submitted patch #1569040

Re: [Python-Dev] PATCH submitted: Speed up + for string concatenation, now as fast as "".join(x) idiom

2006-10-05 Thread Josiah Carlson
"Gregory P. Smith" <[EMAIL PROTECTED]> wrote: > > > I've never liked the "".join([]) idiom for string concatenation; in my > > opinion it violates the principles "Beautiful is better than ugly." and > > "There should be one-- and preferably only one --obvious way to do it.". > > (And perhaps s

Re: [Python-Dev] PATCH submitted: Speed up + for string concatenation, now as fast as "".join(x) idiom

2006-10-05 Thread Nicko van Someren
On 5 Oct 2006, at 20:28, Gregory P. Smith wrote: >> I've never liked the "".join([]) idiom for string concatenation; >> in my >> opinion it violates the principles "Beautiful is better than >> ugly." and >> "There should be one-- and preferably only one --obvious way to do >> it.". >> (And p

Re: [Python-Dev] PATCH submitted: Speed up + for string concatenation, now as fast as "".join(x) idiom

2006-10-05 Thread Larry Hastings
Gregory P. Smith wrote: > have you run any generic benchmarks such as pystone to get a better > idea of what the net effect on "typical" python code is? I hadn't, but I'm happy to. On my machine (a fire-breathing Athlon 64 x2 4400+), best of three runs: Python 2.5 release: Pystone(1.1) time

Re: [Python-Dev] PATCH submitted: Speed up + for string concatenation, now as fast as "".join(x) idiom

2006-10-05 Thread Steve Holden
Gregory P. Smith wrote: >>I've never liked the "".join([]) idiom for string concatenation; in my >>opinion it violates the principles "Beautiful is better than ugly." and >>"There should be one-- and preferably only one --obvious way to do it.". >>(And perhaps several others.) To that end I've

Re: [Python-Dev] PATCH submitted: Speed up + for string concatenation, now as fast as "".join(x) idiom

2006-10-05 Thread Fredrik Lundh
Steve Holden wrote: > instance.method(*args) <==> type.method(instance, *args) > > You can nowadays spell this as str.join("", lst) - no need to import a > whole module! except that str.join isn't polymorphic: >>> str.join(u",", ["1", "2", "3"]) Traceback (most recent call last): File "",