> 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
"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
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
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
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
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 "",