What is different with Python ?

Mike Meyer mwm at mired.org
Tue Jun 14 18:45:11 EDT 2005


Roy Smith <roy at panix.com> writes:

> Mike Meyer <mwm at mired.org> wrote:
>> I've never seen someone explain why, for instance, string addition is 
>> O(n^2) beyond the very abstract "it creates a new string with each 
>> addition". No concrete details at all.
>
> I took a shot at that very question a while ago.  Elephants never forget, 
> and neither does google (http://tinyurl.com/9nrnz).

While that's an excellent explanation of why string addition is
O(n^2), it doesn't really look at the concrete details of the Python
string implementation - which is what I was referring to. I'm sorry
that I was unclear in what I said.

     <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list