John> Sorry, Skip, but I find that very hard to believe. The foo() John> function would take quadratic time if it were merely adding on John> pieces of constant size -- however len(str(i)) is not a constant, John> it is O(log10(i)), so the time should be John> super-quadratic.
Sorry, I should have pointed out that I'm using the latest version of Python. I believe += for strings has been optimized to simply extend s when there is only a single reference to it. Skip -- http://mail.python.org/mailman/listinfo/python-list