intern'ed strings and deepcopy()

Erik Max Francis max at alcyone.com
Fri Apr 11 17:01:40 EDT 2003


Fortepianissimo wrote:

> I can't seem to find the exact description between these two in the
> Library Reference - so am I correct in assuming that deepcopy() will
> not actually duplicate an intern'ed string?

Strings are immutable, so what good would a copy (via copy or deepcopy)
do you?  You cannot possibly change an existing string object, so its
identity is unimportant.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ The price of eternal vigilance is indifference.
\__/ Marshall McLuhan
    Crank Dot Net / http://www.crank.net/
 Cranks, crackpots, kooks, & loons on the Net.




More information about the Python-list mailing list