better way than: myPage += 'more html' , ...

Max M maxm at mxm.dk
Thu Jun 26 09:29:10 EDT 2003


François Pinard wrote:

> Your usage of "should" is Interesting :-).  I wonder what it really means;


I remember reading a post where I saw meassurements that showed it to be 
twice as fast. I was too lazy too google it. But here goes.

http://groups.google.com/groups?q=python+cStringIO+appending+strings&hl=da&lr=&ie=UTF-8&oe=UTF-8&selm=vbo3vb9ajs7l69%40corp.supernews.com&rnum=1


> either that you did not time it, or that you timed it and found it not to be
> the fastest.


Or someone else did, and I didn't have a link handy ;-)


> [1] And also given, for stylistic reasons, that the `io.close()' can be
> spared.  The first example does not explicitely empty `htmlPage'.  But this
> is likely an orthogonal issue and another debate.


Yeah.

regards Max M







More information about the Python-list mailing list