string copying
Steve Holden
sholden at holdenweb.com
Fri Mar 29 17:40:29 EST 2002
"Robin Becker" <robin at jessikat.fsnet.co.uk> wrote in message
news:AZ3xhtAObNp8EwwK at jessikat.fsnet.co.uk...
> Is there some special reason why python inhibits string copying. I
> suppose there's some attempt being made to make these constants. To make
> differing versions of 'abc' one has to resort to silliness like 'ab'+'c'
>
Strings are immutable, and therefore cannot be changed once created. So
there's no point in creating copies, since a copy could never be changed
either.
What would be the point of creating copies?
regards
Steve
More information about the Python-list
mailing list