get-a-cup-of-coffee slow

Grant Griffin not.this at seebelow.org
Thu Aug 9 22:35:57 CEST 2001


In article <9kurh302g4k at drn.newsguy.com>, Grant says...
>
...
>If so, is it because "s +=" is implemented as "s = s
>+", where the new one is always an appended copy of the original?  (I guess I
>would hope that in the case of a string "+=" operation, Python would leave a
>little spare space at the end of the new string so multiple appends would not
>have to make a copy with _each_ append.)

OK, maybe that sort of thing isn't feasible due to the "immutable" nature of
strings.

if-there's-one-thing-we-can't-change-about-python-it's
   -immutability-<wink>-ly y'rs,

=g2

_____________________________________________________________________

Grant R. Griffin                                       g2 at dspguru.com
Publisher of dspGuru                           http://www.dspguru.com
Iowegian International Corporation            http://www.iowegian.com




More information about the Python-list mailing list