string copying

Aahz aahz at pythoncraft.com
Fri Mar 29 16:47:12 EST 2002


In article <AZ3xhtAObNp8EwwK at jessikat.fsnet.co.uk>,
Robin Becker  <robin at jessikat.fsnet.co.uk> wrote:
>
>>>> s='abc'
>>>> import copy
>>>> s is copy.copy(s)
>1
>>>> s is copy.deepcopy(s)
>1
>>>> s is 'ab'+'c'
>0
>
>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'

Why do you care?
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Why is this newsgroup different from all other newsgroups?



More information about the Python-list mailing list