Possible memory leak?

Giovanni Bajo noway at sorry.com
Wed Jan 25 03:07:15 EST 2006


Steven D'Aprano wrote:

> But the real killer is this one line:
>
> row=row+chr(num/64)
>
> Bad, bad BAD idea. Every time you add two strings together, Python
> has to copy BOTH strings. As row gets huge, this takes longer and
> longer to do.

This is no longer true as of CPython 2.4 though. I'm not sure which version the
OP was using because he didn't say.
-- 
Giovanni Bajo





More information about the Python-list mailing list