Re: jython and concatenation of strings

2004-12-15 Thread Nick Coghlan
Jan Gregor wrote: StringBuffer class from java was right solution - yours looses encoding, and in jython I was unable to get it back - in python it worked fine. If you mean that Jython returned a string, when the inputs were unicode, then that can probably be fixed with: result = u''.join(string_

Re: jython and concatenation of strings

2004-12-15 Thread Jan Gregor
StringBuffer class from java was right solution - yours looses encoding, and in jython I was unable to get it back - in python it worked fine. Jan > I don't use Jython, but are you not able to do something like: > > string_list = [] > for ... in ...: > ... > string_list.append(...) >

Re: jython and concatenation of strings

2004-12-13 Thread Jan Gregor
Ok, thanks. I didn't think that += operator is nondestructive operation - but strings are immutable so this makes sense. On 2004-12-13, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: >> I found that price of += operator on string is too high in jython. For >> example 5000 such operations took 90 se

Re: jython and concatenation of strings

2004-12-13 Thread Diez B. Roggisch
> I found that price of += operator on string is too high in jython. For > example 5000 such operations took 90 seconds (i generated html copy of > table with 1000 rows and 5 columns). Generation of row data into separate > string and joining after lead to time 13 seconds !!! Its generally not

Re: jython and concatenation of strings

2004-12-13 Thread Steven Bethard
Jan Gregor wrote: Hello I found that price of += operator on string is too high in jython. For example 5000 such operations took 90 seconds (i generated html copy of table with 1000 rows and 5 columns). Generation of row data into separate string and joining after lead to time 13 seconds !!!

jython and concatenation of strings

2004-12-13 Thread Jan Gregor
Hello I found that price of += operator on string is too high in jython. For example 5000 such operations took 90 seconds (i generated html copy of table with 1000 rows and 5 columns). Generation of row data into separate string and joining after lead to time 13 seconds !!! What's alternati