Speed of string += string

Christopher A. Craig list-python at ccraig.org
Mon Apr 14 10:25:15 EDT 2003


Mads Orbesen Troest <mads at troest.NEVERMORE.dk> writes:

> But is that /guaranteed/ (as it is with STL), or does it just happen to be 
> that way with the current implementation (however unlikely it is to 
> change)?

It's technically not guaranteed even in the current implementation.
All those operations are actually O(N), but that's a very unlikely
worst case.  

-- 
Christopher A. Craig <list-python at ccraig.org>
"Going to school make a person educated, any more than going to a 
garage makes a person a car" Slashdot





More information about the Python-list mailing list